I am looking for a tool (possibly on Linux) that will allow me to make a manual HTTP or HTTPS request. By manual, I really mean it: I should be able to feed it a text file which looks like
POST /foo HTTP/1.1 Host: www.example.com Accept: text/xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-gb,en;q=0.5 Content-Type: text/plain Content-Length: 11 Hello world
and a destination URL (www.example.com/foo), and send the request to the URL. At most, it would be useful if the Content_Length header was automatically computed.
I would be able to write such a tool using some library like httplib in Python, but the very reason I need it is to do manual investigation when something goes wrong with such libraries.