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
When using openapi-fetch to make requests to endpoints that already contain query parameters, additional query parameters are incorrectly appended using a question mark (?) instead of an ampersand (&). This results in malformed URLs that may not be properly processed by the server.
Given the example above, When adding additional params like { page: 1, limit: 10 } should result in:
"/index.php?task=users.getUsers&page=1&limit=10"
But currently results in
"/index.php?task=users.getUsers?page=1&limit=10" // Invalid URL format, has two '?'s
We're interfacing with a legacy php application, where a lot of our "endpoints" are just calls to an old MVC framework. As a result, a load of our endpoints are structured as query params that define the requested resource + query params that change pagination / what entities to return. See the reproduction for an example.
(I'm happy to open a pull request for this - but may need pointing in the direction of the code the currently handles query param appends)
The text was updated successfully, but these errors were encountered:
openapi-fetch version
0.13.4
Description
When using openapi-fetch to make requests to endpoints that already contain query parameters, additional query parameters are incorrectly appended using a question mark (?) instead of an ampersand (&). This results in malformed URLs that may not be properly processed by the server.
Reproduction
Example:
Expected result
Given the example above, When adding additional params like
{ page: 1, limit: 10 }
should result in:But currently results in
We're interfacing with a legacy php application, where a lot of our "endpoints" are just calls to an old MVC framework. As a result, a load of our endpoints are structured as
query params that define the requested resource
+query params that change pagination / what entities to return
. See the reproduction for an example.(I'm happy to open a pull request for this - but may need pointing in the direction of the code the currently handles query param appends)
The text was updated successfully, but these errors were encountered: