About the Set Cookie HTTP Reply sample

This sample shows how you can use an HTTPHeader node to add an HTTPReply header in a message.

The following message flow is imported by the sample:

A screen capture of the HTTPHeader Node Set Cookie message flow

How the flow works:

  1. A request is sent to http://localhost:7080/setHTTPReply.WS
  2. The flow receives the request on the HTTPInput node (SetCookieWS). The Advanced properties page for this node has the "Parse Query String" check box ticked. This causes the query string to be parsed for name=value pairs. These are added to the Local Environment.
  3. The Compute node extracts the value of the name field in the query string from the Local Environment and sets it as the body of the returned message.
  4. The message is passed to an HTTPHeader node (SetCookie), which adds the HTTPReply header, Set-Cookie, with the value Customer Name=Customer1:127.0.0.1:7080/setHTTPReply.WS
  5. An HTTPReply node (ReplyResult) returns the result.
  6. Subsequent requests have an HTTPInput header, Cookie, with the value Customer Name=Customer1:127.0.0.1:7080/setHTTPReply.WS

Back to Read about the HTTPHeader node sample

Back to sample home