Class ZosmfRequest

    • Field Detail

      • X_CSRF_ZOSMF_HEADER_KEY

        public static final String X_CSRF_ZOSMF_HEADER_KEY
        X_CSRF_ZOSMF_HEADER_KEY header info
      • X_CSRF_ZOSMF_HEADER_VALUE

        public static final String X_CSRF_ZOSMF_HEADER_VALUE
        X_CSRF_ZOSMF_HEADER_VALUE header info
      • CERTIFICATE_FORMAT_TYPE

        public static final String CERTIFICATE_FORMAT_TYPE
        File format of certificate
        See Also:
        Constant Field Values
      • connection

        protected final ZosConnection connection
        ZosConnection object
      • headers

        protected final Map<String,​String> headers
        Map of HTTP headers
      • url

        protected String url
        URL string
      • token

        protected kong.unirest.core.Cookie token
        Cookie object representing a TOKEN
    • 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 a Response object from a 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
      • getHeaders

        public Map<String,​String> getHeaders()
        Get current http header value(s) for request
        Returns:
        map of header value(s)