Forum Discussion
Nicolas_Menant
Dec 09, 2008Employee
Hi,
You won't be able to retrieve data like this if it's a POST method. POST means you have to check the payload, to do this you'll have to use HTTP::collect, HTTP::payload, when HTTP_RESPONSE and when HTTP_RESPONSE_DATA
when HTTP_REQUEST {
if {[HTTP::uri] contains "login"} {
HTTP::collect
}
}
when HTTP_REQUEST_DATA {
set parameter_vals [split [HTTP::payload] "&"]
Break out the POST data for username
for {set i 0} {$i < [llength $namevals]} {incr i} {
set params [split [lindex $namevals $i] "="]
if { [lindex $params 0] equals "username" } {
set username [lindex $params 1]
}
}
}
I didn't tested it but should be close
HTH
N.