vADC Forum

Reply
Occasional Contributor
Posts: 12
Registered: ‎11-30-2012

Binary in request - vTM

Hi all,
How can we identify a http request by the POST method that comes as binary.

Thanks for listening.

Brocadian
Posts: 3
Registered: ‎06-12-2013

Re: Binary in request - vTM

You can use something like:

 

if( http.getMethod() == "POST" ) {
    # handle POST request ...
}

 

to test for a POST.

 

You could also and (&&) this with http.getResponseHeader( "Content-Type" ) to match on POSTs for specific Content-Type(s).

 

$body = http.getBody() can be used to get a copy of the POST data.

 

http.getFormParams() returns a hash mapping the names of all the form parameters present in the URL query string and, if the request is a POST, in the POST body data to their values. If the same parameter appears multiple times in the request then it will be mapped to an array of values in the hash that is returned by this function.

 

You might also want to look at the following TrafficScript functions:

 

  • http.getFormParam( Parameter, [Separator] )
  • http.listFormParamNames()
  • http.doesFormParamExist

 

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.

Click to Register
Download FREE NVMe eBook