Skip to content

Pass fetch options to browser providers #3895

@stephenlacy

Description

@stephenlacy

Describe the Feature

Currently when communicating with RPC endpoints (or gateways) additional fetch options are not able to be passed in:

For instance, cors or credentials (fetch credentials vs Authorization header) options.

Code Example

const fetchReq = new ethers.FetchRequest(URL, { credentials: "include" });
const provider = new ethers.JsonRpcProvider(fetchReq);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement.minor-bumpPlanned for the next minor version bump.next-patchIssues scheduled for the next arch release.on-deckThis Enhancement or Bug is currently being worked on.v6Issues regarding v6

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions