Interface R2WRequest


  • public interface R2WRequest
    Interface for making SOAP, REST and content requests to R2W.
    • Method Detail

      • setRequestHeader

        void setRequestHeader​(String header,
                              String value)
        Set the value of a HTTP header.
        Parameters:
        header - the header.
        value - the value.
      • setRequestBody

        void setRequestBody​(String in)
        Set the value of the body (may be null).
        Parameters:
        in - the body.
      • setRequestMethod

        void setRequestMethod​(String in)
        Set the request method (GET, POST, ...).
        Parameters:
        in - the request method.
      • setRequestTimeout

        void setRequestTimeout​(int milliseconds)
        Set the timeout in milliseconds, 0 for no timeout.
        Parameters:
        milliseconds - number of milliseconds
      • getResponseVersion

        String getResponseVersion()
        Get the HTTP response version.
        Returns:
        the HTTP response version.
      • getResponseCode

        int getResponseCode()
        Get the HTTP response code.
        Returns:
        the HTTP response code.
      • getResponsePhrase

        String getResponsePhrase()
        Get the HTTP response phrase (as defined in RFC 2616 Sec 6.1.1.
        Returns:
        the HTTP response phrase.
      • getResponseHeaders

        Map<String,​List<String>> getResponseHeaders()
        Get all the response headers, as a Map<String, List<String>> where keys are header names and the lists are values.
        Returns:
        response headers.
      • getResponseHeader

        String getResponseHeader​(String header)
        Get the value of a response header.
        Parameters:
        header - the name of the response header.
        Returns:
        the value or null if there is no value.
      • getResponseBody

        InputStream getResponseBody()
                             throws IOException
        Get the response content.
        Returns:
        the response content.
        Throws:
        IOException - if an error occurs.