Forum Discussion
danra_139044
Altostratus
Mar 21, 2014iRule: How to grab the Line-base text data and replace with desired value...
Stream content:
POST /provision HTTP/1.1
Content-Length: 56 Content-Type: text/plain; charset=ISO-8859-1 Host: w.x.y.z:abc Connection: Keep-Alive
{"imei":"355031040811111"}HTTP/1.1 10...
danra_139044
Altostratus
Mar 24, 2014Kevin,
It works! Thank you.
--snip--
when HTTP_REQUEST {
if { [HTTP::method] equals "POST" && [HTTP::path] contains "/provision" }{
HTTP::collect [HTTP::header Content-Length]
}
}
when HTTP_REQUEST_DATA {
if { [HTTP::payload] contains "imei_value" } {
HTTP::header replace P "R"
pool destination
}
}
}
--endofsnip--
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