Skip to content

Allow passing custom fetch function #218

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

Merged
merged 3 commits into from
Apr 2, 2021
Merged

Allow passing custom fetch function #218

merged 3 commits into from
Apr 2, 2021

Conversation

sushruth
Copy link
Contributor

@sushruth sushruth commented Apr 1, 2021

This PR introduces a small feature where fetch function used within the HttpClient class can be customized.

Allowing to pass a custom fetch function enables a few things -

  • Add implicit telemetry to the fetch function
  • hook into before and after the function call is made in a generic way
  • Handle special cases in a generic way around fetch function itself

Implements the feature from: #219

@sushruth sushruth changed the title Allow passing custom fetch function Allow passing custom fetch function #219 Apr 2, 2021
@sushruth sushruth changed the title Allow passing custom fetch function #219 Allow passing custom fetch function Apr 2, 2021
@js2me js2me changed the base branch from master to next April 2, 2021 12:56
@js2me
Copy link
Member

js2me commented Apr 2, 2021

Hello @sushruth !
Thanks for your contribution!
This changes will be added in the next release

@js2me js2me merged commit 07fb078 into acacode:next Apr 2, 2021
js2me added a commit that referenced this pull request Apr 4, 2021
* BREAKING_CHANGES: remove default `json` format of the response type

* fix: missing `schema.$ref` in inline enum schemas

* Allow passing custom fetch function (#218)

* Allow passing custom fetch function

* Fixing a mistake

* Using ApiConfig instead of second param

* fix: tests

* chore: refresh schemas

* Fix: query param array serialization (#223)

* make the query params serialization conform to the default open api specs

* uri encode second part

Co-authored-by: stijn.lammens <[email protected]>

* docs: update CHANGELOG

* fix: unused E generic type

* chore: refresh generated test schemas

* bump: up version to 8.0.0

Co-authored-by: Sushruth Shastry <[email protected]>
Co-authored-by: Stijn Lammens <[email protected]>
Co-authored-by: stijn.lammens <[email protected]>
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