Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fetchOptions, callOptions for React Native #652

Merged
merged 0 commits into from
Nov 8, 2022
Merged

Conversation

wackyleo459
Copy link
Contributor

Description

For React Native project, to create new fetch settings that work with React-Native-Fetch-API polyfill.

new HttpAgent ({
    fetchOptions: {
      reactNative: {
        __nativeResponseType: "base64",
      },
    },
    callOptions: {
      reactNative: {
        textStreaming: true,
      },
    },
    host: "http://localhost:8000",
})

When source isn't provided in constructing the HttpAgent, this._fetchOptions and this._callOptions will automatically pull from provided options. Currently this is the only place where fetchOptions and callOptions will be set.

this._fetchOptions = options.fetchOptions; this._callOptions = options.callOptions;

@wackyleo459 wackyleo459 requested a review from a team as a code owner November 8, 2022 18:13
@wackyleo459 wackyleo459 changed the title feature: fetchOptions, callOptions for React Native feat: fetchOptions, callOptions for React Native Nov 8, 2022
@krpeacock krpeacock merged commit 7acaf70 into kyle/fetchOptions Nov 8, 2022
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