Comments (10)
@StephD I am just curious the reason. Thanks for your usage of my extension and many great suggestions.
from vscode-restclient.
Thanks @StephD , I will look into this bug and update in this thread ASAP
from vscode-restclient.
@StephD I think this error is thrown from the http library I use or even the nodejs internal. Could you please provide me the error call stack by clicking 'Toggle Developer Tools'? And can I test your API from my side, or a public API that you can repo the error, maybe I need to use tool like WireShark to capture the tcp/http packet
from vscode-restclient.
debugViewer.ts:933 Parse Error
e.doShow @ debugViewer.ts:933
e.show @ debugViewer.ts:907
(anonymous function) @ main.contribution.ts:36
i.Class.derive._oncancel @ monarchCompile.ts:91
t.$showMessage @ main.contribution.ts:33
e.handle @ window.ts:48
s @ commonCodeEditor.ts:925
f @ commonCodeEditor.ts:977
_combinedTickCallback @ internal/process/next_tick.js:67
_tickCallback @ internal/process/next_tick.js:98
Good luck with that :)
Unfortunately, you can't try it from your side.
The different between with and without exit is that the content type is text/plain with exit and text/xml without.
In both case, the response is the content of the file. But without exit, response also contain an xml part.
What I want to ask is the possibility to get the raw version of the response.
This error is generated from the server side (content-type, ..) so thanks to you, I can know that something goes wrong.
But I just ask you for raw functionality :)
EDIT : I found the error on my side. "exit" must be added to download file.
Btw, I keep the proposition to display the raw response if the parsing doesn't work, or the text without parsing.
For me, you can close this request and add a proposition about the raw value.
Thanks
from vscode-restclient.
@StephD however I can't repro your failure by get a invalid xml file with content-type: text/html;charset=UTF-8
. You can try to get this file GET https://humao1576.blob.core.windows.net/test/test.txt HTTP/1.1
from vscode-restclient.
You are correct, on your server, even if it's the same error with resteasy, vscode do not give me any parsing error.
I don't know. Thanks for your time
from vscode-restclient.
@StephD So I still guess, the so-called Parse Error
is from the node js http library which parses the response and find the response invalid, the invalid here seems not related to wrong content body, but should related to http response format. Maybe if you don't exit in your php code, the server maybe generate some invalid content in response, which cause nodejs http library error.
Below are my guess:
- Will the response body in fact is larger than 9(in your example) which causes the Parse Error
- Can you add a request header
Connection:keep-alive
to test the vscode rest client behavior
from vscode-restclient.
1: Response length modification let appear xml part : Test file
2: Connection:keep-alive do not change anything in vscode
from vscode-restclient.
@StephD according to your first screenshot, the Content-Length returned from the server seems 9, and in your case as your mentioned above, the Content-Length shall be larger than 9 due to xml header? Can you try to make the Content-Length header reflects the real length? If I am wrong, sorry for the inconvenience.
from vscode-restclient.
I did it. I put it to 100 to let appear this xml part. This is why there is a parsing error I think because as xml, it's invalid.
Btw. Like I said, there was an error in my code so this error come from me, not your extension.
from vscode-restclient.
Related Issues (20)
- Multi-part requests: user should be able to set content-type for each part in a multi-part request. HOT 3
- Cannot click SEND REQUEST if swapping window HOT 7
- Concatenate variables HOT 1
- Request body in JSON file not working with relative or absolute path HOT 1
- Response extremely slow compared to Postman HOT 1
- Is it possible to not encode a Basic Authorization header?
- Output or Print response or value of variable ( HOT 3
- 插件失效了哦 HOT 1
- No Send Request link HOT 1
- [VS Code IDE] socket hang up only for http request after upgrade vscode to v1.81 and above
- Warning: The content type of response is application/json, while response body is not a valid json string HOT 1
- add support for default url defined by `@host` for httpyac compatibitlity
- why not support 'DELETE' option. HOT 2
- The gzip-compressed JSON data transmitted by the backend is not available to the variables.
- TLS problem(mybe) with domain in /etc/hosts with traefik
- Please release latest version HOT 1
- 👾 not working for me - details in description HOT 1
- can you support the Jetbrains IDEA environment json file for vscode ?
- Duration in response output window
- Integrate automation test scripts
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-restclient.