Rajesh
Sep 12, 2018Nimbostratus
jason response
Hi,
There is an requirement to return a jason response message for an application contains an context (/applicationname) .. Please help how do i implement it as irule
Use HTTP::respond
eg
when HTTP_REQUEST {
HTTP::respond 200 -version 1.1 content { { "name": "Pete White" } } Content-Type application/json
}
Note that the use of curly brackets
{ }
around content means that there will be no variable interpolation. You can also use speech marks ""
as well.
Lots of good examples if you get stuck.