Package org.apache.http.params
Class HttpProtocolParams
- java.lang.Object
-
- org.apache.http.params.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 inHttpParams.- Since:
- 4.0
-
-
Field Summary
-
Fields inherited from interface org.apache.http.params.CoreProtocolPNames
HTTP_CONTENT_CHARSET, HTTP_ELEMENT_CHARSET, HTTP_MALFORMED_INPUT_ACTION, HTTP_UNMAPPABLE_INPUT_ACTION, ORIGIN_SERVER, PROTOCOL_VERSION, STRICT_TRANSFER_ENCODING, USE_EXPECT_CONTINUE, USER_AGENT, WAIT_FOR_CONTINUE
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.StringgetContentCharset(HttpParams params)Deprecated.Obtains value of theCoreProtocolPNames.HTTP_CONTENT_CHARSETparameter.static java.lang.StringgetHttpElementCharset(HttpParams params)Deprecated.Obtains value of theCoreProtocolPNames.HTTP_ELEMENT_CHARSETparameter.static java.nio.charset.CodingErrorActiongetMalformedInputAction(HttpParams params)Deprecated.Obtains value of theCoreProtocolPNames.HTTP_MALFORMED_INPUT_ACTIONparameter.static java.nio.charset.CodingErrorActiongetUnmappableInputAction(HttpParams params)Deprecated.Obtains the value of theCoreProtocolPNames.HTTP_UNMAPPABLE_INPUT_ACTIONparameter.static java.lang.StringgetUserAgent(HttpParams params)Deprecated.Obtains value of theCoreProtocolPNames.USER_AGENTparameter.static ProtocolVersiongetVersion(HttpParams params)Deprecated.Obtains value of theCoreProtocolPNames.PROTOCOL_VERSIONparameter.static voidsetContentCharset(HttpParams params, java.lang.String charset)Deprecated.Sets value of theCoreProtocolPNames.HTTP_CONTENT_CHARSETparameter.static voidsetHttpElementCharset(HttpParams params, java.lang.String charset)Deprecated.Sets value of theCoreProtocolPNames.HTTP_ELEMENT_CHARSETparameter.static voidsetMalformedInputAction(HttpParams params, java.nio.charset.CodingErrorAction action)Deprecated.Sets value of theCoreProtocolPNames.HTTP_MALFORMED_INPUT_ACTIONparameter.static voidsetUnmappableInputAction(HttpParams params, java.nio.charset.CodingErrorAction action)Deprecated.Sets the value of theCoreProtocolPNames.HTTP_UNMAPPABLE_INPUT_ACTIONparameter.static voidsetUseExpectContinue(HttpParams params, boolean b)Deprecated.Sets value of theCoreProtocolPNames.USE_EXPECT_CONTINUEparameter.static voidsetUserAgent(HttpParams params, java.lang.String useragent)Deprecated.Sets value of theCoreProtocolPNames.USER_AGENTparameter.static voidsetVersion(HttpParams params, ProtocolVersion version)Deprecated.Sets value of theCoreProtocolPNames.PROTOCOL_VERSIONparameter.static booleanuseExpectContinue(HttpParams params)Deprecated.Obtains value of theCoreProtocolPNames.USE_EXPECT_CONTINUEparameter.
-
-
-
Method Detail
-
getHttpElementCharset
public static java.lang.String getHttpElementCharset(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.HTTP_ELEMENT_CHARSETparameter. If not set, defaults toUS-ASCII.- Parameters:
params- HTTP parameters.- Returns:
- HTTP element charset.
-
setHttpElementCharset
public static void setHttpElementCharset(HttpParams params, java.lang.String charset)
Deprecated.Sets value of theCoreProtocolPNames.HTTP_ELEMENT_CHARSETparameter.- Parameters:
params- HTTP parameters.charset- HTTP element charset.
-
getContentCharset
public static java.lang.String getContentCharset(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.HTTP_CONTENT_CHARSETparameter. If not set, defaults toISO-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 theCoreProtocolPNames.HTTP_CONTENT_CHARSETparameter.- Parameters:
params- HTTP parameters.charset- HTTP content charset.
-
getVersion
public static ProtocolVersion getVersion(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.PROTOCOL_VERSIONparameter. If not set, defaults toHttpVersion.HTTP_1_1.- Parameters:
params- HTTP parameters.- Returns:
- HTTP protocol version.
-
setVersion
public static void setVersion(HttpParams params, ProtocolVersion version)
Deprecated.Sets value of theCoreProtocolPNames.PROTOCOL_VERSIONparameter.- Parameters:
params- HTTP parameters.version- HTTP protocol version.
-
getUserAgent
public static java.lang.String getUserAgent(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.USER_AGENTparameter. If not set, returnsnull.- Parameters:
params- HTTP parameters.- Returns:
- User agent string.
-
setUserAgent
public static void setUserAgent(HttpParams params, java.lang.String useragent)
Deprecated.Sets value of theCoreProtocolPNames.USER_AGENTparameter.- Parameters:
params- HTTP parameters.useragent- User agent string.
-
useExpectContinue
public static boolean useExpectContinue(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.USE_EXPECT_CONTINUEparameter. If not set, returnsfalse.- Parameters:
params- HTTP parameters.- Returns:
- User agent string.
-
setUseExpectContinue
public static void setUseExpectContinue(HttpParams params, boolean b)
Deprecated.Sets value of theCoreProtocolPNames.USE_EXPECT_CONTINUEparameter.- Parameters:
params- HTTP parameters.b- expect-continue flag.
-
getMalformedInputAction
public static java.nio.charset.CodingErrorAction getMalformedInputAction(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.HTTP_MALFORMED_INPUT_ACTIONparameter.- 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.Sets value of theCoreProtocolPNames.HTTP_MALFORMED_INPUT_ACTIONparameter.- Parameters:
params- HTTP parametersaction- action to perform on malformed inputs- Since:
- 4.2
-
getUnmappableInputAction
public static java.nio.charset.CodingErrorAction getUnmappableInputAction(HttpParams params)
Deprecated.Obtains the value of theCoreProtocolPNames.HTTP_UNMAPPABLE_INPUT_ACTIONparameter.- 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 theCoreProtocolPNames.HTTP_UNMAPPABLE_INPUT_ACTIONparameter.- Parameters:
params- HTTP parametersaction- action to perform on un mappable inputs- Since:
- 4.2
-
-