Post body on http error - WeOnlyDo Discussion board

Post body on http error (wodHttpDLX)

by tk, Thursday, January 03, 2019, 09:36 (1902 days ago)

Any idea where to find body of a http post request if service returns a error code 400+ ? Service returns error message in the body that would be nice to have. Normal body property seems to be empty in these cases.

Post body on http error

by Jasmine, Thursday, January 03, 2019, 09:42 (1902 days ago) @ tk

Hi.

Reponse.Body should always have full body, if one is present. Are you sure it's empty when it should contain data?

You can check full conversation with the server by setting the DebugFile to some filename where wodHttpDLX will dump all sent/received data, so you can inspect if it's parsing problem. But in this specific case, Response.Body must work for you.

Kind regards,
Jasmine.

Post body on http error

by tk, Thursday, January 03, 2019, 13:23 (1902 days ago) @ Jasmine

Hi.

Reponse.Body should always have full body, if one is present. Are you sure it's empty when it should contain data?

You can check full conversation with the server by setting the DebugFile to some filename where wodHttpDLX will dump all sent/received data, so you can inspect if it's parsing problem. But in this specific case, Response.Body must work for you.

Kind regards,
Jasmine.

Hello and thank you for a fast response! We figured this out with your help and empty response body was caused by the fact that we used non blocking post and didn't wait for the result.