How can you get ReqBin to POST a body to a logic app?

I'm baffled trying to get ReqBin to actually send a body! It thinks it is, but the logic app doesn't think so. I've checked using Curl that the logic app is working as expected, i.e. it's accepting a POST request with request body. The test request has a 15 character body, and the logic app shows the expected details; both body and the various headers; content-type and content-length.

When I try to use ReqBin, it reckons it's sent the test body of 15 characters, see below. But the logic app reckons there was 0 content-length.

I'm trying similar in ReqBin, because it's a lot easier to just cut & paste each of my test request bodies into the web UI, rather than hand-encoding each of the JSON request to use in a Curl command.

How can I determine where the content is being lost, when Curl works, but ReqBin doesn't ?

ReqBin ...

POST /workflows/c604f34c750c49cba716f2998b1ce1d3/triggers/request/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Frequest%2Frun&sv=1.0&sig=xxxxxxxxxx HTTP/1.1
Host: prod-57.northeurope.logic.azure.com
Content-Type: application/json
Content-Length: 15

and the response from the logic app ...

headers:  {"Transfer-Encoding":"chunked","Accept":"*/*","Accept-Encoding":"deflate,gzip","Host":"prod-57.northeurope.logic.azure.com","User-Agent":"Mozilla/5.0,(Windows NT 10.0; Win64; x64),AppleWebKit/537.36,(KHTML, like Gecko),Chrome/64.0.3282.140,Safari/537.36,Edge/18.17763","Content-Type":"application/json","Content-Length":"0"}

I don't believe it's the logic app, as I can happily do a POST with body in both Postman and Curl. It's just ReqBin that doesn't seem to want to send the body.

Curl ...

curl -d "{\"key\":\"value\"}" -X POST "https://prod-57.northeurope.logic.azure.com:443/workflows/c604f34c750c49cba716f2998b1ce1d3/triggers/request/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Frequest%2Frun&sv=1.0&sig=xxxxxxxxxx" -H "Content-Type: application/json" -H "Accept: application/json" 

and the response ...

body: {"key":"value"}
headers:  {"Accept":"application/json","Host":"prod-57.northeurope.logic.azure.com","User-Agent":"curl/7.55.1","Content-Length":"15","Content-Type":"application/json"}
  1. In your curl example, you have added "Accept: application/json" HTTP header but missed this header in ReqBin request. Some servers reject sending JSON back to the client when the client doesn't provide this header. Please add this header on the Headers tab and try again.

  2. Do you get the same result when making your curl request in ReqBin Curl client? https://reqbin.com/curl

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.