Forum Discussion
Kevin_Stewart
Oct 19, 2015Employee
I assume you understand that "X-Response" will be returned to the client as an HTTP header. If you want the data to be present in the HTTP payload you'd use the "Content" tag:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/about/health/status" } {
HTTP::respond 200 Content "TestOK"
}
}
As far as the data that you send back, that can come from any values presented in the client's request and potentially a wealth of server side information. For example, to send the client's IP back:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/about/health/status" } {
HTTP::respond 200 X-Response "TestOK: [IP::client_addr]"
}
}