You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the main module (src/index.ts) exposes 5 request creators with method already set (get, post, put, patch and del) using an internal combinator (setMethod).
This combinator suffers of the same bug of #328: the method wont be overwritten by subsequent combinators or provided RequestInit.
Current behavior
appy.post(['http://some.endpoint'], {method: 'GET'}) ignores method in RequestInit always sending request as POST
Expected behavior
appy.post(['http://some.endpoint'], {method: 'GET'}) should send request as GET
Environment:
OS: all
Browser: all
Node/npm version: all
Typescript version: all
Additional information
We can take advantage of this fix to expose a new combinator withMethod that can be used by the lib's consumers.
The text was updated successfully, but these errors were encountered:
Description
Currently the main module (
src/index.ts
) exposes 5 request creators withmethod
already set (get
,post
,put
,patch
anddel
) using an internal combinator (setMethod
).This combinator suffers of the same bug of #328: the
method
wont be overwritten by subsequent combinators or providedRequestInit
.Current behavior
appy.post(['http://some.endpoint'], {method: 'GET'})
ignoresmethod
inRequestInit
always sending request asPOST
Expected behavior
appy.post(['http://some.endpoint'], {method: 'GET'})
should send request asGET
Environment:
Additional information
We can take advantage of this fix to expose a new combinator
withMethod
that can be used by the lib's consumers.The text was updated successfully, but these errors were encountered: