Class TextGetRequest


  • public class TextGetRequest
    extends ZoweRequest
    Http get operation with text content type
    Version:
    1.0
    Author:
    Frank Giordano
    • Constructor Detail

      • TextGetRequest

        public TextGetRequest​(ZOSConnection connection)
        TextGetRequest constructor.
        Parameters:
        connection - connection information, see ZOSConnection object
    • 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
        Initialize the http request object with an url value
        Specified by:
        setRequest in class ZoweRequest
        Parameters:
        url - rest url end point
        Throws:
        Exception - error setting the http request
      • setRequest

        public void setRequest​(String url,
                               String body)
                        throws Exception
        Initialize the http request object with an url and body values

        This method isn't valid for this request. Method returns exception error if used with message "request requires url only".

        Specified by:
        setRequest in class ZoweRequest
        Parameters:
        url - rest url end point
        body - data to be sent with request
        Throws:
        Exception - error setting the http request