alfredng1
asked on
How to use HttpClient to send the request message?
How can I use HttpClient to send the below request message to 192.168.0.100?
Request message
-------------------------- ---------- -----
POST /login.asp HTTP/1.1
Host: 192.168.0.100
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071220 BonEcho/2.0.0.11
Accept: text/xml,application/xml,a pplication /xhtml+xml ,text/html ;q=0.9,tex t/plain;q= 0.8,image/ png,*/*;q= 0.5
Accept-Language: en-us,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://192.168.0.100/
Content-Type: application/x-www-form-url encoded
Content-Length: 10
psword=123
-------------------------- ---------- ---------- ---------- ---------- ---------- -------
Request message
--------------------------
POST /login.asp HTTP/1.1
Host: 192.168.0.100
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071220 BonEcho/2.0.0.11
Accept: text/xml,application/xml,a
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q
Keep-Alive: 300
Connection: keep-alive
Referer: http://192.168.0.100/
Content-Type: application/x-www-form-url
Content-Length: 10
psword=123
--------------------------
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://hc.apache.org/httpclient-3.x/