Forum Discussion
Rupa_34586
Nimbostratus
Nov 17, 2009Setting HTTP cookie
My requirment is to set a cookie and then redirect to another uri. Here is the code i am using
HTTP::cookie insert name "ADPADMIN" value $forcedpod path "/" domain "commonag-portal-dit.nj.adp.com"
HTTP::redirect "/public/index.htm"
i am able to redirect to the uri but not able to set the cookie.
Let me know any thoughts
4 Replies
- hoolio
Cirrostratus
You can't use HTTP::redirect and set an HTTP header in the redirect response. You can do this using HTTP::respond (Click here): - Rupa_34586
Nimbostratus
I tried using the HTTP::respond.Below is my complete code - hoolio
Cirrostratus
Make sure to include the Location header name in the redirect, as HTTP::respond won't set it automatically like HTTP::redirect does: - Rupa_34586
Nimbostratus
Hey Aaron thanks a lot..it worked
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects