Class HttpClientRequest

java.lang.Object
com.ibm.cics.server.API
com.ibm.cics.server.HttpClientRequest

public class HttpClientRequest extends API
This class provides the Java implementation of HTTP client requests related to the following CICS API commands:
  • WEB SEND SESSTOKEN
  • WEB WRITE SESSTOKEN.

The constructor accepts METHOD and MEDIATYPE information. These values can be altered by setter methods before the send methods are used to send a client request to the server.

The setter methods allow instance variables to be set in the HttpClientRequest object. These variables relate to the following options on the CICS API command WEB SEND SESSTOKEN:

  • METHOD
  • MEDIATYPE
  • CLOSE
  • NOCLOSE
  • EXPECT
  • PATH
  • URIMAP
  • CLICONVERET
  • NOCLICONVERT
  • QUERYSTRING
  • DOCDELETE
  • NODOCDELETE
  • AUTHENTICATE NONE
  • AUTHENTICATE BASIC

Various send methods allow a document, an application buffer, data stored in a container or a chunked request to be sent to the server.

Method writeHeader() allows the application to supply HTTP headers that will be sent with the client request.

See Also:
Since CICS TS version:
3.1
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Constant - NOT SET
  • Constructor Summary

    Constructors
    Constructor
    Description
    The METHOD is saved in the HttpClientRequest object for later use by the send methods.
    HttpClientRequest(String method, String mediaType)
    The METHOD and MEDIATYPE information is saved in the HttpClientRequest object for later use by the send methods.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    send(HttpSession session)
    Send an request without a body to the server.
    void
    sendChunk(HttpSession session, byte[] from)
    Send an application buffer to the server as part of a chunked request.
    void
    sendChunk(HttpSession session, String from)
    Send an application buffer to the server as part of a chunked request.
    void
    sendContainer(HttpSession session, Container container)
    Send data stored in a container to the server.
    void
    Send a document to the server.
    void
    sendFrom(HttpSession session, byte[] from)
    Send an application buffer to the server.
    void
    sendFrom(HttpSession session, String from)
    Send an application buffer to the server.
    void
    Indicate that the chunked request is complete.
    void
    Sets WEB SEND SESSTOKEN command option ACTION to EXPECT.
    void
    Sets WEB SEND SESSTOKEN command option AUTHENTICATE to BASIC.This method also clears any user-name or password information already set by method setAuthenticationBasic(String userName, String password).
    void
    setAuthenticationBasic(String userName, String password)
    Sets WEB SEND SESSTOKEN command option AUTHENTICATE to BASIC and sets the WEB SEND SESSTOKEN command options USERNAME, USERNAMELEN, PASSWORD and PASSWORDLEN.
    void
    Sets WEB SEND SESSTOKEN command option AUTHENTICATE to NONE.
    void
    setCharacterset(String characterset)
    Sets WEB SEND SESSTOKEN command option CHARACTERSET.
    void
    Sets WEB SEND SESSTOKEN command option CLIENTCONV to CLICONVERT.
    void
    Sets WEB SEND SESSTOKEN command option CLOSESTATUS to CLOSE.
    void
    Sets WEB SEND SESSTOKEN command option DOCSTATUS to DOCDELETE.
    void
    setMediaType(String mediaType)
    Sets WEB SEND SESSTOKEN command option MEDIATYPE.
    void
    Sets WEB SEND SESSTOKEN command option METHOD to DELETE.
    void
    Sets WEB SEND SESSTOKEN command option METHOD to GET.
    void
    Sets WEB SEND SESSTOKEN command option METHOD to HEAD.
    void
    Sets WEB SEND SESSTOKEN command option METHOD to OPTIONS.
    void
    Sets WEB SEND SESSTOKEN command option METHOD to PATCH.
    void
    Sets WEB SEND SESSTOKEN command option METHOD to POST.
    void
    Sets WEB SEND SESSTOKEN command option METHOD to PUT.
    void
    Sets WEB SEND SESSTOKEN command option METHOD to TRACE.
    void
    Sets WEB SEND SESSTOKEN command option CLIENTCONV to NOCLICONVERT.
    void
    Sets WEB SEND SESSTOKEN command option CLOSESTATUS to NOCLOSE.
    void
    Sets WEB SEND SESSTOKEN command option DOCSTATUS to NODOCDELETE.
    void
    Sets WEB SEND SESSTOKEN command option PATH.
    void
    setQueryString(String queryString)
    Sets WEB SEND SESSTOKEN command option QUERYSTRING.
    void
    setUrimap(String urimap)
    Sets WEB SEND SESSTOKEN command option URIMAP.
    void
    writeHeader(HttpSession session, String header, String value)
    Add HTTP header information to the request This is equivalent to CICS API command WEB WRITE SESSTOKEN.

    Methods inherited from class com.ibm.cics.server.API

    getCICSServerApiVersion

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait