Free-Conversant Support / Request Macros
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search



Documentation >> Macros >> Request Macros

Request Macros

These docs are incomplete, but they're a start.

The following macros are useful for getting information about the current "request." A request is when a browser (or other http client) asks Conversant for anything (usually a page or message).

  • #request.client

    ip address where request originated

  • #request.hostname

    hostname (like www.free-conversant.com) that is serving the request

  • #request.method

    GET, POST, HEAD, etc.

  • #request.onePathArg argName="something"

    get the value of one field, by name, from the path args

  • #request.onePostArg argName="something"

    get the value of one field, by name, from a POST request

  • #request.oneSearchArg argName="something"

    get the value of one field, by name, from the search args

  • #request.path [showSearchArgs="true/false" showPathArgs="true/false"]

    get the path (starting with the first / after the hostname in the URL), optionally including the pathArgs and searchArgs

  • #request.pathArgs

    get the raw pathArgs from the URL, not including the $ at the front

  • #request.port

    get the port requested by the client. If no port was specified by the client, then return 80 for standard requests and 443 for secure requests.

  • #request.postArgs

    get the raw postArgs in the exact format provided by the client when it makes a POST request

  • #request.protocol

    http or https

  • #request.referer

    generally, the URL which included a link resulting in the current request (page A has a link to page B, so when you click on the link page A is the referer)

  • #request.searchArgs

    get the raw searchARgs from the URL for the current request, not including the ? at the front

  • #request.URL [showSearchArgs="true/false" showPathArgs="true/false"]

    get the full URL which produced the current request (Note that POST args are not included in the URL), optionally omitting the path and search args

Note: Attributes (parameters) in brackets are optional, and values in bold are the default value for that attribute.

View in DG