-
Notifications
You must be signed in to change notification settings - Fork 316
GET body not sended #354
Comments
GET requests with json content type have no body. You should use POST, or |
I see. Yes, that does make sense, but what should I do if API requires to be every request in JSON? Even empty GET requests (in that case body must be only And I just found #99 which sounds very familiar. |
It's not a way REST api should be used, and it's not supported with json content type right now in the engine itself. Please provide an example of public API you're trying to work with. Also you can check |
https://developers.home-assistant.io/docs/api/rest/ |
I've checked the api, and you shouldn't pass any parameters in json or body form to server for GET requests |
Yes, and I already wrote about that. |
Unfortunately, I hoped to use this library as a quick-and-dirty solution to prototype some features before using C++. But for now (especially if I will need to modify the plugin's code) it will be simpler for me to implement features directly in code, not in blueprints. If you still want me to test these changes, then I can find time to do this... next week? |
@LaG1924 I've sent an update to Marketplace, hope it'll be processed soon (for UE 4.26 and UE 4.27) |
my VaRest worked for 3 days, now "GET" stopped permanently |
tl;dr: when request type is GET and Content-Type is Json, "Content-Length" is non-zero but body not send.
Hello. This is my first experience with this library, so it's maybe just me using this library's API in the wrong way.
I'm trying to make a test GET request, but it just does not work (no PrintString node on fail/completed callback). So, I started investigation:
In logs was the next messages:
After spending some time debugging the web server I figured out that it was a malformed request send by the library:
It's declaring the request's "Content-Length" header but does not send the body (request end with two newlines), so the web server is still waiting for data and not sending a response.
But for POST (I didn't test other methods) it successfully sends the body with the correct "Content-Length" header.
For Content-Type "x-www-form-urlencoded (URL)" it sets "Content-Lenth: 0", so it works too.
The text was updated successfully, but these errors were encountered: