LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP POST "Response body" incomplete content

Solved!
Go to solution

The request is a regular HTTP POST using JSON. Running the code returns with status 200 OK but the responce body is completely different.


Expected Responce body: The call was successfull! JSON-String = <Request JSON-String>

 

Somehow the responce header Content-Type: text/html; charset=utf-8 eventhough it was assigned to "applicaion/json".

 

Executing with POSTMAN or c# with same settings returns the expected responce. See images in attachments.

 

Am i doing something wrong or some settings in LabVIEW webserver needs to be configured.

 

I tried to recreate the code using .net but was unsuccesfull.

0 Kudos
Message 1 of 4
(2,255 Views)
Solution
Accepted by topic author nik35324

This is on the server implementation and not much we can help with from the LV side with the info you have. You'll want to use wireshark to capture and compare the requests being made between postman and LV; I suspect there's some other headers or formatting that's causing the difference but knowing what to "fix" would depend on knowing what the server is doing.

~ The wizard formerly known as DerrickB ~
Gradatim Ferociter
0 Kudos
Message 2 of 4
(2,221 Views)

Thank you very much for suggesting sniffing tool Wireshark. Issue has been resolved.

 

Passed empty string to input Path

 

nik35324_0-1675439995797.png

 

0 Kudos
Message 3 of 4
(2,193 Views)

Then I lied, a screenshot of the code probably would have solved this too 😉

~ The wizard formerly known as DerrickB ~
Gradatim Ferociter
0 Kudos
Message 4 of 4
(2,176 Views)