Class JsonPostRequest


  • public class JsonPostRequest
    extends ZoweRequest
    Http post operation with Json content type
    Version:
    1.0
    Author:
    Frank Giordano
    • Constructor Detail

      • JsonPostRequest

        public JsonPostRequest​(ZOSConnection connection,
                               String url,
                               String body)
                        throws Exception
        JsonPostRequest constructor.
        Parameters:
        connection - connection information, see ZOSConnection object
        url - rest url value
        body - data to be attached to the request
        Throws:
        Exception - error setting constructor variables
    • Method Detail

      • setStandardHeaders

        public void setStandardHeaders()
        Set the standard headers for the http request
        Specified by:
        setStandardHeaders in class ZoweRequest
      • setHeaders

        public void setHeaders​(Map<String,​String> headers)
        Set any headers needed for the http request
        Specified by:
        setHeaders in class ZoweRequest
        Parameters:
        headers - headers to add to the request
      • setRequest

        public void setRequest​(String url)
                        throws Exception
        Set the following incoming url with a new http request
        Specified by:
        setRequest in class ZoweRequest
        Parameters:
        url - rest url end point
        Throws:
        Exception - error setting the http request