Class ZosmfRequest

    • Field Detail

      • X_CSRF_ZOSMF_HEADER_KEY

        public static final String X_CSRF_ZOSMF_HEADER_KEY
      • X_CSRF_ZOSMF_HEADER_VALUE

        public static final String X_CSRF_ZOSMF_HEADER_VALUE
      • cookie

        protected kong.unirest.core.Cookie cookie
    • Constructor Detail

      • ZosmfRequest

        public ZosmfRequest​(ZosConnection connection)
        ZosmfRequest constructor
        Parameters:
        connection - connection information, see ZosConnection object
    • Method Detail

      • buildResponse

        public <T> Response buildResponse​(kong.unirest.core.HttpResponse<T> reply)
                                   throws ZosmfRequestException
        Build Response object from given HttpResponse reply
        Type Parameters:
        T - either JsonNode, String or byte[] type
        Parameters:
        reply - HttpResponse object
        Returns:
        Response object
        Throws:
        ZosmfRequestException - request error state
      • setBody

        public abstract void setBody​(Object body)
        Set the body information for the http request
        Parameters:
        body - object value
      • setHeaders

        public void setHeaders​(Map<String,​String> headers)
        Set any headers needed for the http request
        Parameters:
        headers - headers to add to the request
      • setStandardHeaders

        public abstract void setStandardHeaders()
        Set the standard headers for the http request
      • setCookie

        public void setCookie​(kong.unirest.core.Cookie cookie)
        Set a cookie token for this request. This is optional for most requests and not needed. Setting the cookie will remove the HTTP header authentication. Setting the cookie value as null after giving it a value will revert/enable the HTTP header authentication for future requests.
        Parameters:
        cookie - object