-
Notifications
You must be signed in to change notification settings - Fork 125
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
Response message get processed by JSON.stringify() multiple times. #1396
Labels
bug
Something isn't working
Comments
Not merged and released yet, though. But soon. 🤞 |
marclave
added a commit
that referenced
this issue
May 21, 2024
* feat: use new proxy 🥳 * chore: revert to use env var for proxy * chore: remove trailing slash * chore: remove old api client proxy example * chore: disable old proxy tests * docs: show how to use a different port for the proxy * chore: use same port as before for the new proxy server * fix: fetch spec test uses old proxy format * chore: add a fetch spec test with a local proxy * chore: add fresh sendRequest tests * fix: TS issue * chore: bring back all the old sendRequest tests * fix: localhost url has https * docs(changeset): feat: [BREAKING CHANGE] use new HTTP proxy (#1703) * chore: enable deprecation warning * fix: cors headers are merged to invalid values * fix: ApiClient component requires withDefaultFonts property * chore: improve the deprecation warning * refactor: better render response bodies * feat: add /404 route to the echo server * feat: handle network errors in the proxy * chore: add test for the /404 route * feat: better error handling * chore: code style * feat: skip proxy for requests to localhost * fix: tests still expect JSON strings * chore: write another test for the error handling * fix: TS issue * fix: test * chore: update lock file * fix: proxy deprecation warnings appear in local environment * chore: improve no preview available wording * feat: show network errors in the code block * chore: make response body less error prone * feat: show axios error in console * fix: variables in urls aren’t replaced * tests: variables in URLs are replaced properly * fix: tests * test: urls with slashes and pathes with slashes shouldn’t be concatenated with a duplicate slash * refactor: new normalizeHeaders helper * chore: update lock file --------- Co-authored-by: Hans Pagel <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happens?
Response message get processed by JSON.stringify() multiple times.
See example
Method "ping" actually returns string
"Pong\n"
not the"\\"Pong\\\\n\\""
.I want to note that i'm not using data-proxy-url.
It seems that using a proxy may change the visible response value.
What did you expect to happen?
Raw data that server returns:
How can we reproduce the issue?
The same result can be achieved by using this command:
console.log(JSON.stringify(JSON.stringify("Pong\n")));
Swagger/OpenAPI Example
No response
The text was updated successfully, but these errors were encountered: