Interface IRequestContent

  • All Known Implementing Classes:
    URLEncodedContent

    public interface IRequestContent
    The request content interface used to format the request appropriately depending on what is being sent.
    Author:
    Christopher Mindus
    • Field Detail

      • ACCEPT_CHARSET

        static final java.lang.String ACCEPT_CHARSET
        The String: "Accept-Charset".
        See Also:
        Constant Field Values
      • ACCEPT_ENCODING

        static final java.lang.String ACCEPT_ENCODING
        The String: "Accept-Encoding".
        See Also:
        Constant Field Values
      • CONTENT_TYPE

        static final java.lang.String CONTENT_TYPE
        The String: "Content-Type".
        See Also:
        Constant Field Values
      • CONTENT_LENGTH

        static final java.lang.String CONTENT_LENGTH
        The String: "Content-Length".
        See Also:
        Constant Field Values
      • X_HTTP_METHOD_OVERRIDE

        static final java.lang.String X_HTTP_METHOD_OVERRIDE
        The String: "X-HTTP-Method-Override".
        See Also:
        Constant Field Values
    • Method Detail

      • onPreProcessRequest

        void onPreProcessRequest​(RESTfulRequest request,
                                 boolean doPerform)
                          throws PropException,
                                 java.io.UnsupportedEncodingException,
                                 java.net.URISyntaxException
        Pre-processes the request as required, i.e. to change the URL to add a Query String for e.g. a GET method.

        This call is done prior to establishing the URLConnection.

        Parameters:
        request - The request.
        doPerform - Flag to perform the transaction or false to test validity.
        Throws:
        PropException - For property errors.
        java.io.UnsupportedEncodingException - For unsupported encodings.
        java.net.URISyntaxException - For URI syntax errors for parameters.
        java.io.UnsupportedEncodingException - For unsupported encodings.
      • onPostProcessRequest

        void onPostProcessRequest​(RESTfulRequest request,
                                  boolean doPerform)
                           throws PropException,
                                  java.io.IOException,
                                  java.io.UnsupportedEncodingException
        Post-processes the request as required, typically to modify the URLConnection, called before the "connect" method is called for URLConnection.
        Parameters:
        request - The request.
        doPerform - Flag to perform the transaction or false to test validity.
        Throws:
        PropException - For property errors.
        java.io.IOException - For I/O errors.
        java.io.UnsupportedEncodingException - For unsupported encodings.