openapistack / openapi-client-axios

JavaScript client library for consuming OpenAPI-enabled APIs with axios
https://openapistack.co
MIT License
558 stars 67 forks source link

Use fetch instead of axios as HTTP client #73

Closed jgornick closed 3 years ago

jgornick commented 3 years ago

Is it possible to use the fetch API as the HTTP client instead of axios? In places where the fetch API is available (e.g., browser), I'd like to use it instead of including another HTTP client library.

Using cross-fetch allows us to use the same fetch API across all platforms (e.g., browser, node.js and React Native).

Thanks!

anttiviljami commented 3 years ago

Hi @jgornick while I love the idea, that'd be a different library. This lib specifically relies on axios features; hence the name. :)

anttiviljami commented 2 years ago

Hi @jgornick, this PR #126 might actually now allow this !