What is the proper way to send a \'full\' cookie across a URLConnection?
I\'ve been using:
URL url = new URL(page);
URLConnection urlConn = url.op
Well, if you are only setting a cookie I guess you could simply do like:
urlConn.setRequestProperty("Cookie", "user=mary17; domain=airtravelbargains.com; path=/autos");
If you're setting more than one cookie than you could probably use the addRequestProperty
method instead.
For the expires attribute make sure to use the format: Weekday, DD-Mon-YY HH:MM:SS GMT.
The only legal time zone is GMT, and the separators between the elements of the date must be dashes.