Replies: 5 comments
-
Usage examples look nice, but the interface seems to be limited to JSON-based server APIs that use non-200 status codes. I'd love to implement Maybe we should make const getUser = reatomFetch(...) // common fetcher
const myFetch = createReatomFetch({
parse: resp => ...,
})
const getUser = myFetch(...) // specific fetcher |
Beta Was this translation helpful? Give feedback.
-
I also want to point that package name should be discussed: |
Beta Was this translation helpful? Give feedback.
-
@krulod you could rely on https://github.com/developit/redaxios/blob/master/src/index.js |
Beta Was this translation helpful? Give feedback.
-
@BANOnotIT you are right, probably 🤔 |
Beta Was this translation helpful? Give feedback.
-
fyi |
Beta Was this translation helpful? Give feedback.
-
We need a meta package on top of
reatomAsync
, which will accepts allfetch
parameters and a few more options to extendsRequest
.Some feature examples
By default the first passed argument should be stringified to the
body
.For dynamic paths or the need for some mappings, it should be possible to pass the request creation function.
Something for inspiration: https://github.com/developit/redaxios
Beta Was this translation helpful? Give feedback.
All reactions