According to the task, you need to make a request for receiving the image img.jpg, located on the server http://www.test2.ru in the images folder, while transferring the variable tst = 123 using the POST method. The request looks like this

GET http://www.test2.ru/images/img.jpg HTTP/1.0\r\n Host: http://www.test2.ru \r\n Referer: http://www.test2.ru/index.html\r\n Cookie: income=1\r\n \r\n 

How to transfer the variable tst = 123 by the POST method?

    1 answer 1

     POST http://www.test2.ru/images/img.jpg HTTP/1.0\r\n Host: http://www.test2.ru \r\n Referer: http://www.test2.ru/index.html\r\n Cookie: income=1\r\n Content-Type: application/x-www-form-urlencoded\r\n Content-Length: 7\r\n \r\n tst=123 

    content-length - the length of the message body in bytes. tst = 123 - 7 bytes

    • are you sure? - Heidel
    • slightly corrected, added content type and content flax. So it will be more accurate. - fStrange