You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by RedCarpet <bl...@gmx.com> on 2009/04/28 16:15:09 UTC
Creating Cookies, set domain
I'm using HttpClient 4.0-beta2
Problem:
My app needs to be able to create cookies that are used to login on a
website, on the first HTTP request.
With httpclient-3.x I could easily create a cookie using:
Cookie(String domain, String name, String value, String path, Date expires,
boolean secure)
and then add them to the client using:
httpClient.getState().addCookie(cookie);
But HttpClient 4 only has
Cookie(String name, String value)
How can I set the domain, path etc?
--
View this message in context: http://www.nabble.com/Creating-Cookies%2C-set-domain-tp23277965p23277965.html
Sent from the HttpClient-User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
Re: Creating Cookies, set domain
Posted by sebb <se...@gmail.com>.
On 28/04/2009, RedCarpet <bl...@gmx.com> wrote:
>
> I'm using HttpClient 4.0-beta2
>
> Problem:
> My app needs to be able to create cookies that are used to login on a
> website, on the first HTTP request.
>
> With httpclient-3.x I could easily create a cookie using:
> Cookie(String domain, String name, String value, String path, Date expires,
> boolean secure)
> and then add them to the client using:
> httpClient.getState().addCookie(cookie);
>
>
> But HttpClient 4 only has
> Cookie(String name, String value)
>
> How can I set the domain, path etc?
Have a look at BasicClientCookie / BasicClientCookie2
> --
> View this message in context: http://www.nabble.com/Creating-Cookies%2C-set-domain-tp23277965p23277965.html
> Sent from the HttpClient-User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org