ajayksh
asked on
adding a header field in UrlConnection
Hi,
How do i add an extra field in the header while doing a POST from my java pgm. I am using a UrlConnection to POST the data.
Do I need to use UrlConnection.setRequestPr operty() method ???
Thanx
ajay
How do i add an extra field in the header while doing a POST from my java pgm. I am using a UrlConnection to POST the data.
Do I need to use UrlConnection.setRequestPr
Thanx
ajay
What do you mean by "header" ?
Is that data that is transfered with each "message", or once per communication ?
yuval.
Is that data that is transfered with each "message", or once per communication ?
yuval.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'm not sure what you mean by "extra" field, but you can certainly set headers using UrlConnection.setRequestPr
//set the agent in the header
UrlConnection.setRequestPr
//set the "from" IP in the header UrlConnection.setRequestPr
UrlConnection.setRequestPr
UrlConnection.setRequestPr
UrlConnection.setRequestPr
You should read RFC1945 for more information about headers.