Reputation: 7261
I have used HttpConnection in J2ME for communication between server. I want to send some data to server with http header. Can anybody tel me how to set header information with HttpConnection. Any example. Thanks
Upvotes: 0
Views: 764
Reputation: 3380
From http://www.j2mesalsa.com/elearning/networking.html :
Set Header Information
To set request header properties use setRequestProperty(String key, String value).
Example:
setRequestProperty( "User-Agent", "Profile/MIDP-1.0 Configuration/CLDC-1.0" )
Hope it helps.
Upvotes: 5