Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

    1. Enter:

      Code Block
      languagetext
      themeEclipse
      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.

...