Class HttpProtocolParams

java.lang.Object
org.apache.http.params.HttpProtocolParams
All Implemented Interfaces:
CoreProtocolPNames

public final class HttpProtocolParams
extends Object
implements CoreProtocolPNames
This class implements an adaptor around the HttpParams interface to simplify manipulation of the HTTP protocol specific parameters.
Note that the implements relation to CoreProtocolPNames is for compatibility with existing application code only. References to the parameter names should use the interface, not this class.
Since:
4.0
Version:
$Revision: 576089 $
Author:
Oleg Kalnichevski
See Also:
CoreProtocolPNames
  • Method Details

    • getHttpElementCharset

      public static String getHttpElementCharset​(HttpParams params)
      Returns the charset to be used for writing HTTP headers.
      Returns:
      The charset
    • setHttpElementCharset

      public static void setHttpElementCharset​(HttpParams params, String charset)
      Sets the charset to be used for writing HTTP headers.
      Parameters:
      charset - The charset
    • getContentCharset

      public static String getContentCharset​(HttpParams params)
      Returns the default charset to be used for writing content body, when no charset explicitly specified.
      Returns:
      The charset
    • setContentCharset

      public static void setContentCharset​(HttpParams params, String charset)
      Sets the default charset to be used for writing content body, when no charset explicitly specified.
      Parameters:
      charset - The charset
    • getVersion

      public static ProtocolVersion getVersion​(HttpParams params)
      Returns protocol version to be used per default.
      Returns:
      protocol version
    • setVersion

      public static void setVersion​(HttpParams params, ProtocolVersion version)
      Assigns the protocol version to be used by the HTTP methods that this collection of parameters applies to.
      Parameters:
      version - the protocol version
    • getUserAgent

      public static String getUserAgent​(HttpParams params)
    • setUserAgent

      public static void setUserAgent​(HttpParams params, String useragent)
    • useExpectContinue

      public static boolean useExpectContinue​(HttpParams params)
    • setUseExpectContinue

      public static void setUseExpectContinue​(HttpParams params, boolean b)