Forum Discussion
goldi_247196
Nimbostratus
Feb 17, 2016how get response parameters
I need to load to f5(persist) one parameter from the response data I get from one of load balancer servers,
How do I access the data received in response?
Stanislas_Piro2
Cumulonimbus
Feb 22, 2016Try this irule:
when HTTP_RESPONSE {
Trigger collection for up to 1MB of data
if {[HTTP::header exists "Content-Length"] && [HTTP::header "Content-Length"] <= 1048576}{
set content_length [HTTP::header "Content-Length"]
} else {
set content_length 1048576
}
Check if $content_length is not set to 0
if { ([HTTP::status] == 200) && ($content_length > 0)} {
HTTP::collect $content_length
}
}
when HTTP_RESPONSE_DATA {
do stuff with the payload
find the application unique identifier between and (5 is the length of string)
persist add uie [string trim [findstr [HTTP::payload] "" 5 ""]]
}
when HTTP_REQUEST {
persist uie [string trim [findstr [HTTP::payload] "" 5 ""]]
}
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