0

I am getting an HTTP 411 error when testing a POST request. I am not an expert with APIs but I feel like I'm not a complete newbie, either. I am using Advanced Rest Client to test the request because I don't have code generating it. I am trying to replicate a process that will be sent in by a customer's process.

I have looked in as many places as I could find, including here, for the answer. Basically what I found is two answers:

  • you have to have the Content-Length header with the length of the request
  • you can put in the Content-Length header with a length of 0

I have tried both of these options and many other combinations of headers that I thought might work but to no avail. I always end up with a 411 except when I tried to put in something with Authentication. Then I got a "Go away, you can't be here." :)

Can anyone help me with this?

Thank you in advance!

  • Hi and welcome to StackOverflow. Your question is too general. Add some more details such as where you run your request from localhost/remote host, how you calculate the content length etc. – ino Mar 16 '18 at 13:49
  • Thank you for the welcome, ino. I am running this from a remote host. I calculated the length by pasting the payload into Notepad++ and checking the length. I'm sorry but I'm not sure what else to specify. I can certainly answer questions. Maybe I'm more of a newbie than I thought... – user74387 Mar 16 '18 at 13:54

0 Answers0