Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The UDR type created in the HTTPD agent can be viewed in the UDR Internal Format Browser. To open the browser right-click in the editing area of an APL Editor and select UDR Assistance.... The browser opens.

Format

The built-in HTTP format definition must be extended prior to usage of the HTTPD format.

To extend the HTTP format:

  1. Open the Ultra Format Editor by clicking the New Configuration button in the upper left part of the Desktop window, and then selecting Ultra Format from the menu.

    1. Enter:

      internal MYHTTPD: extends_class ("com.digitalroute.wfc.http.HttpdUDR")
      {
        // Additional fields (if required).
      };


      The following fields are included in the built-in HTTPD format:

      Field
      Description
      accept(string) 

      Media types that are acceptable in the response, e g text/plain. This field is included in the request header.

      acceptEncoding(string)   Restricts the content encodings that are acceptable in the response, e g gzip. This field is included in the request header.
      clientHost(string)The host
      clientPort(int)The port
      content(string)The content itself.
      contentEncoding(string)  Additional content encodings that have been applied to the entity-body, e g gzip. This field is included in the response header.
      contentLength(int)The length of the content in bytes.
      contentType(string)The type of the content, e g "image/gif".
      errorMessage(string)This field is populated by the HTTPD agent when an error occurs. It is not included in the request or response. 
      host(string)

      This field specifies the host IP and port number of the resource being requested.

      httpHeaders(map<any.any>)

      This field is populated by all the headers present in the request. The map keys contain header field names and the content is stored in the corresponding map values.

      httpResponseHeaders(map<any.any>)

      This field can be used include custom headers in the response. Use the map key to set a header field name and the corresponding map value to set the content.

      query(string)The query.
      redirectURL(string)In case you want to redirect a request, this field should contain the URL to which you want to redirect.
      requestMethod(string)The request method, e g GET, POST.
      response(string)

      The response code, and an optional message, which will be returned to the requesting user. The code and the message must be separated by a space, e g "200 OK". If the message is omitted, it will be set automatically to the same value as the response code.

      responseBinary(bytearray)The response in binary format.
      responseStatusCode(string)HTTP header response code.
      responseType(string)The type of the response, e g "text/html". You must set a value in this field.
      userAgent(string)Shows user information, e g browser type and browser version used.

      Additional fields may be entered. This is useful mainly for transportation of variable values to subsequent agents.
       

  2. Save your Ultra by clicking on the Save button and entering the name of the Ultra.


  • No labels