Skip to content

Conversation

pcfreak30
Copy link
Contributor

No description provided.

Added an optional `headers` property to the `TrustlessGatewayBlockBroker` and `TrustlessGatewaySession` options, allowing users to specify custom headers for HTTP requests.

Changes include:
* Added `headers` property to `TrustlessGatewayBlockBroker` and `TrustlessGatewaySession` options
* Updated `findHttpGatewayProviders` function to accept an optional `headers` object
* Passed `headers` object to `TrustlessGateway` constructor
* Updated `TrustlessGateway` constructor to accept an optional `headers` object
* Added `headers` to HTTP request options in `TrustlessGateway`
Copy link
Member

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pcfreak30 Thanks again for throwing this together.

I talked with @achingbrain about this. We will probably alter this to accept a function where users can alter the RequestInit object we pass to the fetch call on line 108 of packages/block-brokers/src/trustless-gateway/trustless-gateway.ts

This will allow users to modify headers or anything else they need to so we don't have to foresee the various changes users might need to make, nor keep modifying or maintaining those changes as needed for their special use-cases.

This will keep things flexible for various new use-cases while keeping the maintenance burden low

@SgtPooki
Copy link
Member

closing this in favor of #751. Thanks for the headstart @pcfreak30

@SgtPooki SgtPooki closed this Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants