1 Reply Latest reply: Aug 4, 2011 12:16 AM by EJP RSS

    Creating original HTTP request from HttpServletRequest

    725707
      I have a need of creating original HTTP request from HttpServletRequest from GET,POST,DELETE etc.

      For eg: if I get thie below request I need to re-create without using proxy tool but only using HttpServletRequest.

      GET /en/html/dummy.php?name=MyName&married=not+single &male=yes HTTP/1.1
      Host: www.explainth.at
      User-Agent: Mozilla/5.0 (Windows;en-GB; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11
      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
      Accept-Encoding: gzip,deflate
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Keep-Alive: 300
      Connection: keep-alive
      Referer: http://www.explainth.at/en/misc/httpreq.shtml
      POST /en/html/dummy.php HTTP/1.1
      Host: www.explainth.at
      User-Agent: Mozilla/5.0 (Windows;en-GB; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11
      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
      Accept-Encoding: gzip,deflate
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Keep-Alive: 300
      Connection: keep-alive
      Referer: http://www.explainth.at/en/misc/httpreq.shtml
      Content-Type: application/x-www-form-urlencoded
      Content-Length: 39
      
      name=MyName&married=not+single&male=yes
      Thanks