HTTP Post filtering


#1

I need some help to understand how to do filtering for HTTP POST.

This does not seem to work:

if (event == “HTTP_REQUEST”){
if(HTTP.method.POST){

after HTTP.method there is no "autocomplete’ for POST. I tried this syntax also with no luck:

if (event == “HTTP_REQUEST”){
if(HTTP.method == POST){

Any one know the right syntax here? Thanks guys.


#2

Hi Kris,
POST is not a property of the HTTP object. You need to match the value of method to the string POST, so please try

if (HTTP.method.indexOf(“POST”) > -1) { }

Please let us know if this worked.


#3

Worked.

if (event == “HTTP_REQUEST”){
if (HTTP.method.indexOf(“POST”) > -1) {
Flow.store.httpQuery = HTTP.query;
Flow.store.httpHead = HTTP.headersRaw;
Flow.store.ClientPayLoad = HTTP.payloadText;
debug(“Payload:” + HTTP.payloadText)
}}

I appreciate your help.