User-Agent: Mozilla / 4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
Here we do not send any data requests to the Server because we are instructing a page that is plain HTML from the Server. The connection is General-Header, and the rest of the Header are the required Headers. The following example shows how to send sample data to the Server by using the required notification body:
POST /cgi-bin/process.cgi HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT) Host: www.tutorialspoint.com Content-Type: application/x-www-form-urlencoded Content-Length: length Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: Keep-Alive licenseID=string&content=string&/paramsXML=string
Here, the URl is provided with /cgi-bin/process.cgi that will be used to process the transmitted data and accordingly a response will be returned. Here content-type tells the Server that the transmitted data is a simple web form data and length will be the actual length of the data set in the notification body. The following example shows how you can pass pure XML to your Server.
POST /cgi-bin/process.cgi HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT) Host: www.tutorialspoint.com Content-Type: text/xml; charset=utf-8 Content-Length: length Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: Keep-Alive string
According to Tutorialspoint
Previous post: Message in HTTP
Next post: Feedback (Response) in HTTP