API raw body issue

I have this post request, but it keeps telling me protocal http not supported,
I ran the same code on post man, it worked.
Can you help to check if I did anything wrong?

Hi Jason,

Just a guess here, but I notice that the editable part of your resource's URL starts with api, but the non-editable portion might end with api/; hard to say because it's cut off:

Screenshot 2024-11-26 at 2.26.47 PM

So I wonder if it's simply a case of a malformed URL. (I realize the protocol error might not seem to imply this, but that could be a downstream issue or something.)

To know more, could you click the "API Request" tab of the Output pane and screenshot that so the details of the request are apparent? There could be a good clue in there.

Screenshot 2024-11-26 at 2.26.55 PM

1 Like

Thank you for your reply,

Looking at the screenshots, the API request generated by retool has something like this: "body": "[{"container_number":"FYCU7218547"}]",


Hmm, it looks like those POST endpoints and error response in your recent screenshots are different from previously—hopefully that's progress!

What I think needs to happen now is to specify the content type of the POST as JSON by adding this as a header (key/value):
Content-Type application/json

See the Retool's query guide docs for details.

I think you could also change the body type from Raw to JSON to have the request automatically include that header, but it'll depend on how much control over the payload you need.

1 Like