Forum Discussion
JT_144596
Nimbostratus
Jun 15, 2016edit a request variable after being set?
Hi,
I'm setting a variable copy of a GET request, is it possible to change the values within the variable after I have set?
for instance, the URI?
example:
set req [HTTP::request]
set req uri...
JT_144596
Nimbostratus
Jun 17, 2016Added as answer so i can format
Here is the irule, i have *** where the functionality needs to go.
when HTTP_REQUEST {
set Original_request [HTTP::request]
HTTP::uri "/newURI[HTTP::uri]"
Send the out-of-band validation query to the MicroService.
log local0. "Calling new service"
pool new_service_pool
}
}
}
when HTTP_RESPONSE {
if {[HTTP::status] eq 302 } {
pool 2nd_pool
***** Change the $Original_request URI ****
HTTP::retry $Original_request
} else {
HTTP::retry $Original_request
log local0. "No Re-direct - Carry on as we were"
}
}
Vijay_E
Cirrus
Jun 18, 2016Instead of saving the request, why not use a fresh one ? The fresh one seems to be completely independent of the saved request, unless I am mistaken.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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