Start of change

Creating a URIMAP definition for an HTTP request by CICS as an HTTP client

This topic tells you how to create a URIMAP definition which specifies the components of the URI for an HTTP client request (scheme, host and path), and an SSL client certificate to be used with the request, if required. A URIMAP definition can be named on the WEB OPEN command, to provide a scheme and host name and a default path for the connection. It can also be named on a WEB SEND command, to provide a path for the relevant request. Alternatively, you can use the WEB EXTRACT URIMAP command to extract information from the URIMAP definition and use it directly in the application program that makes the HTTP client request.

  1. Identify the URL that you plan to use for the HTTP client request . The URL represents a resource that you plan to access on a server.
  2. Identify whether a client certificate might be required for the request, and obtain a suitable certificate label. If the scheme used for the request is HTTPS (HTTP with SSL), the server might request a SSL client certificate. If this happens, CICS® supplies the certificate label that is specified in the URIMAP definition.
  3. Divide the URL for the request into its scheme, host and path components. The components of a URL explains each of these components and how they are delimited. You should also use a port number if it has been specified explicitly in the URL. For example, in the URL http://www.research.ibm.com:1030/software/htp/cics/index.html:
    • The scheme component is http
    • The host component is www.research.ibm.com
    • The port number is 1030
    • The path component is /software/htp/cics/index.html
    The delimiters :// (colon and two forward slashes) following the scheme component are not used in a URIMAP definition. The delimiter / (forward slash) at the beginning of the path component can either be included or omitted in the PATH specification; if you omit it, CICS automatically provides it. If you want to provide a query string in the URL for the request, you can specify this on the WEB SEND command using the QUERY option.
  4. Begin a URIMAP definition with a name and group of your choice, using one of the methods listed in the CICS Resource Definition Guide .
  5. Use the STATUS attribute to specify whether the URIMAP definition should be installed in an enabled or disabled state.
  6. Specify a USAGE attribute of CLIENT (CICS as an HTTP client).
  7. Specify the SCHEME attribute as the scheme component of the URL for the request. HTTP (without SSL) or HTTPS (with SSL) can be used. Do not include the delimiters :// following the scheme component.
  8. Specify the HOST attribute as the host component of the URL for the request. Include the port number (prefixed by a colon) if it has been specified explicitly in the URL.
  9. Specify the PATH attribute as the path component of the URL for the request. A wildcard (asterisk) cannot be used in a URIMAP definition for CICS as an HTTP client. You can either include or omit the delimiter / (forward slash) at the beginning of the path component; if you omit it, CICS automatically provides it. If the URIMAP definition is referenced on a WEB OPEN command, this path becomes the default path for WEB SEND commands for that connection. If the URIMAP definition is referenced on a WEB SEND command, the path is used for that WEB SEND command, but note that the host attribute for that URIMAP definition must match the host specified on the WEB OPEN command for the connection. Do not include a query string in the path component; you can specify this on the WEB SEND command using the QUERY option.
  10. Optional: If SSL is being used, specify the CERTIFICATE attribute as the label of the certificate that is to be used as the SSL client certificate for this request.
  11. Optional: If SSL or TLS is being used, specify the CIPHERS attribute as the cipher code that is to be used for this request.
End of change