HTTPCookie
HTTP Transport Cookie
Index > Books > Declarative Development Guide > Reference Library > Accessor Listing > HTTPCookie

Rate this page:
Really useful
Satisfactory
Not helpful
Confusing
Incorrect
Unsure
Extra comments:


Module

urn:org:ten60:netkernel:tpt:http

Definition

Active URI Base

active:HTTPCookie

Format

<instr>
  <type>HTTPCookie</type>
  <operand>this:param:cookie</operand>
  <operator>
    <cookie>
      <get>myCookie</get>
    </cookie>
  </operator>
  <target>var:cookie</target>
</instr>

Syntax

ArgumentRulesDescription
typeMandatory HTTPCookie
operandMandatory always this:param:cookie
operatorMandatory the cookie argument
paramOptional [Set Only]An XML cookie to be set
targetMandatory the target resource

The HTTPCookie accessor gets and sets Cookies on the HTTP transport. It generates and consumes cookie data in an XML form making it easy to process cookies in a general XML application. The XML form of a cookie is

<cookie>
  <name>somecookieid</name>
  <value>some value</value>
  <path>somepath</path>
  <domain>somedomain</domain>
  <secure>is secure</secure>
  <maxage>some expiry</maxage>
  <comment>some comment</comment>
</cookie>

The elements name and value are mandatory, other elements can optionally be set.

Operator Syntax

The HTTPCookie accessor takes an operator argument which indicates whether to get or set a cookie. If get is used the get element contains the name of the cookie to retrieve. If set is used an XMLized cookie must be provided as the param on the instruction.

<cookie>
  <set /> or
  <get>cookieName</get>
</cookie>
© 2003-2005, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.