Given: http://anyurl.com/Base/Processor/ is the base url to hit a controller action on Processor, I have no trouble using HTTP GET to pass values to the server using REST routes “/value” or form parameter “?value=value”.
However, when I try to post placing the payload in the http request body, I cannot get the server to accept the input. I have tried several variations of the following:
User-Agent: Fiddler
Host: anyurl.com
Content-Length: 11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
value=value
Any help would be appreciated.
So that the server understands how to process the POSTed content you need to set the
Content-Typeheader. In your example this should be set tox-form-www-urlencoded.