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
    • 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.HttpResponse<T> reply)
        Build Response object from given HttpResponse reply
        Type Parameters:
        T - either JsonNode, String or byte[] type
        Parameters:
        reply - HttpResponse object
        Returns:
        Response object
      • executeRequest

        public abstract Response executeRequest()
                                         throws kong.unirest.UnirestException
        Perform the http rest request
        Returns:
        Response object
        Throws:
        kong.unirest.UnirestException - processing request error
      • setBody

        public abstract void setBody​(Object body)
                              throws kong.unirest.UnirestException
        Set the body information for the http request
        Parameters:
        body - object value
        Throws:
        kong.unirest.UnirestException - error setting body
      • 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