Class HttpProtocolParams

  • All Implemented Interfaces:
    CoreProtocolPNames

    @Deprecated
    public final class HttpProtocolParams
    extends java.lang.Object
    implements CoreProtocolPNames
    Deprecated.
    (4.3) use configuration classes provided 'org.apache.http.config' and 'org.apache.http.client.config'
    Utility class for accessing protocol parameters in HttpParams.
    Since:
    4.0
    • Method Detail

      • getHttpElementCharset

        public static java.lang.String getHttpElementCharset​(HttpParams params)
        Deprecated.
        Obtains value of the CoreProtocolPNames.HTTP_ELEMENT_CHARSET parameter. If not set, defaults to US-ASCII.
        Parameters:
        params - HTTP parameters.
        Returns:
        HTTP element charset.
      • setHttpElementCharset

        public static void setHttpElementCharset​(HttpParams params,
                                                 java.lang.String charset)
        Deprecated.
        Sets value of the CoreProtocolPNames.HTTP_ELEMENT_CHARSET parameter.
        Parameters:
        params - HTTP parameters.
        charset - HTTP element charset.
      • getContentCharset

        public static java.lang.String getContentCharset​(HttpParams params)
        Deprecated.
        Obtains value of the CoreProtocolPNames.HTTP_CONTENT_CHARSET parameter. If not set, defaults to ISO-8859-1.
        Parameters:
        params - HTTP parameters.
        Returns:
        HTTP content charset.
      • setContentCharset

        public static void setContentCharset​(HttpParams params,
                                             java.lang.String charset)
        Deprecated.
        Sets value of the CoreProtocolPNames.HTTP_CONTENT_CHARSET parameter.
        Parameters:
        params - HTTP parameters.
        charset - HTTP content charset.
      • getUserAgent

        public static java.lang.String getUserAgent​(HttpParams params)
        Deprecated.
        Obtains value of the CoreProtocolPNames.USER_AGENT parameter. If not set, returns null.
        Parameters:
        params - HTTP parameters.
        Returns:
        User agent string.
      • setUserAgent

        public static void setUserAgent​(HttpParams params,
                                        java.lang.String useragent)
        Deprecated.
        Sets value of the CoreProtocolPNames.USER_AGENT parameter.
        Parameters:
        params - HTTP parameters.
        useragent - User agent string.
      • useExpectContinue

        public static boolean useExpectContinue​(HttpParams params)
        Deprecated.
        Obtains value of the CoreProtocolPNames.USE_EXPECT_CONTINUE parameter. If not set, returns false.
        Parameters:
        params - HTTP parameters.
        Returns:
        User agent string.
      • setUseExpectContinue

        public static void setUseExpectContinue​(HttpParams params,
                                                boolean b)
        Deprecated.
        Sets value of the CoreProtocolPNames.USE_EXPECT_CONTINUE parameter.
        Parameters:
        params - HTTP parameters.
        b - expect-continue flag.
      • getMalformedInputAction

        public static java.nio.charset.CodingErrorAction getMalformedInputAction​(HttpParams params)
        Deprecated.
        Obtains value of the CoreProtocolPNames.HTTP_MALFORMED_INPUT_ACTION parameter.
        Parameters:
        params - HTTP parameters.
        Returns:
        Action to perform upon receiving a malformed input
        Since:
        4.2
      • setMalformedInputAction

        public static void setMalformedInputAction​(HttpParams params,
                                                   java.nio.charset.CodingErrorAction action)
        Deprecated.
        Parameters:
        params - HTTP parameters
        action - action to perform on malformed inputs
        Since:
        4.2
      • getUnmappableInputAction

        public static java.nio.charset.CodingErrorAction getUnmappableInputAction​(HttpParams params)
        Deprecated.
        Obtains the value of the CoreProtocolPNames.HTTP_UNMAPPABLE_INPUT_ACTION parameter.
        Parameters:
        params - HTTP parameters
        Returns:
        Action to perform upon receiving a unmapped input
        Since:
        4.2
      • setUnmappableInputAction

        public static void setUnmappableInputAction​(HttpParams params,
                                                    java.nio.charset.CodingErrorAction action)
        Deprecated.
        Sets the value of the CoreProtocolPNames.HTTP_UNMAPPABLE_INPUT_ACTION parameter.
        Parameters:
        params - HTTP parameters
        action - action to perform on un mappable inputs
        Since:
        4.2