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

TypeScript http core - Enable custom fetch to be passed #489

Closed
nikithauc opened this issue Aug 13, 2021 · 3 comments · Fixed by #728
Closed

TypeScript http core - Enable custom fetch to be passed #489

nikithauc opened this issue Aug 13, 2021 · 3 comments · Fixed by #728
Assignees
Labels
enhancement New feature or request needs more information TypeScript Pull requests that update Javascript code

Comments

@nikithauc
Copy link
Contributor

nikithauc commented Aug 13, 2021

Similar to microsoftgraph/msgraph-sdk-javascript#493

AB#10685

@nikithauc nikithauc added the TypeScript Pull requests that update Javascript code label Aug 13, 2021
@nikithauc nikithauc self-assigned this Aug 13, 2021
@nikithauc nikithauc added the enhancement New feature or request label Aug 13, 2021
@baywet
Copy link
Member

baywet commented Aug 16, 2021

Hey @nikithauc,
Thanks for reaching out.
Today this is already possible, although we don't have default options set up yet see the static factory for the fetch request init
Let me know if you were thinking about something else?

@nikithauc nikithauc changed the title TypeScript http core - Enable custom fetch option TypeScript http core - Enable custom fetch to be passed Aug 24, 2021
@nikithauc
Copy link
Contributor Author

Hi @baywet
I think the title got confusing. The user should to pass a fetch function. Example -> customFetch : callback returning Promise<Response> = So basically, the FetchMiddleware be optional or should simply return the fetch function that the user has passed or check if customFetch is present and call that function instead of the cross-fetch fetch function.

@baywet
Copy link
Member

baywet commented Aug 25, 2021

Sorry, I'm not understanding that last reply.
What would this achieve? Customizing the default request inits? Something else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs more information TypeScript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants