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 I specify a path to a JSON file to use as the request body and send the request, nothing happens. I see no response indicating an error, I see nothing produces in the REST client output logs - it just seems like nothing happens.
Steps to Reproduce:
Create a .json file with JSON content to use as the request body, e.g. ./test-data.json, example contents:
{
"name": "example-name"
}
Add a call to an endpoint and pass in this file as the request body, e.g.
POST localhost:1234/test/endpoint
Accept: application/json
Content-Type: application/json
< ./test-data.json
Call endpoint
I have tried using both absolute path and relative path to the rile and experience the same problem in each case.
I notice that the (docs)[https://github.com/Huachao/vscode-restclient?tab=readme-ov-file#request-body] example only uses an XML file, and doesnt specify that only XML is supported, or that multiple file types are supported, so I expect that a JSON file should work. But maybe this is not the case?
The text was updated successfully, but these errors were encountered:
It looks like the request actually is being sent, as when making the request when against an invalid target API I get a toaster error pop up:
The connection was rejected. Either the requested service isn’t running on the requested server/port, the proxy settings in vscode are misconfigured, or a firewall is blocking requests. Details: RequestError: connect ECONNREFUSED 127.0.0.1:5264.
However when the target API is available and I make the request, I dont see any REST client logs and I dont get a response panel open up.
The json files are working for me as well as with relative to the root of the workspace as well as the current http file. Both the rest.http and file.json files in /somefolder from the root and works both ways:
< somefolder/file.json - no leading /
< ./file.json
What if to try to catch errors through your api side? For example, to get the request json body.
@SwankyLynx From what I recall, the request wasnt actually reaching my code, so there was nothing to catch. I also had request/response logging set up, and none of that was being triggered.
I'll try set this up again and see if I get the same issue
When I specify a path to a JSON file to use as the request body and send the request, nothing happens. I see no response indicating an error, I see nothing produces in the REST client output logs - it just seems like nothing happens.
Steps to Reproduce:
./test-data.json
, example contents:I have tried using both absolute path and relative path to the rile and experience the same problem in each case.
I notice that the (docs)[https://github.com/Huachao/vscode-restclient?tab=readme-ov-file#request-body] example only uses an XML file, and doesnt specify that only XML is supported, or that multiple file types are supported, so I expect that a JSON file should work. But maybe this is not the case?
The text was updated successfully, but these errors were encountered: