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.String
getContentCharset(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.HTTP_CONTENT_CHARSET
parameter.static java.lang.String
getHttpElementCharset(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.HTTP_ELEMENT_CHARSET
parameter.static java.nio.charset.CodingErrorAction
getMalformedInputAction(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.HTTP_MALFORMED_INPUT_ACTION
parameter.static java.nio.charset.CodingErrorAction
getUnmappableInputAction(HttpParams params)
Deprecated.Obtains the value of theCoreProtocolPNames.HTTP_UNMAPPABLE_INPUT_ACTION
parameter.static java.lang.String
getUserAgent(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.USER_AGENT
parameter.static ProtocolVersion
getVersion(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.PROTOCOL_VERSION
parameter.static void
setContentCharset(HttpParams params, java.lang.String charset)
Deprecated.Sets value of theCoreProtocolPNames.HTTP_CONTENT_CHARSET
parameter.static void
setHttpElementCharset(HttpParams params, java.lang.String charset)
Deprecated.Sets value of theCoreProtocolPNames.HTTP_ELEMENT_CHARSET
parameter.static void
setMalformedInputAction(HttpParams params, java.nio.charset.CodingErrorAction action)
Deprecated.Sets value of theCoreProtocolPNames.HTTP_MALFORMED_INPUT_ACTION
parameter.static void
setUnmappableInputAction(HttpParams params, java.nio.charset.CodingErrorAction action)
Deprecated.Sets the value of theCoreProtocolPNames.HTTP_UNMAPPABLE_INPUT_ACTION
parameter.static void
setUseExpectContinue(HttpParams params, boolean b)
Deprecated.Sets value of theCoreProtocolPNames.USE_EXPECT_CONTINUE
parameter.static void
setUserAgent(HttpParams params, java.lang.String useragent)
Deprecated.Sets value of theCoreProtocolPNames.USER_AGENT
parameter.static void
setVersion(HttpParams params, ProtocolVersion version)
Deprecated.Sets value of theCoreProtocolPNames.PROTOCOL_VERSION
parameter.static boolean
useExpectContinue(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.USE_EXPECT_CONTINUE
parameter.
-
-
-
Method Detail
-
getHttpElementCharset
public static java.lang.String getHttpElementCharset(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.HTTP_ELEMENT_CHARSET
parameter. 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_CHARSET
parameter.- Parameters:
params
- HTTP parameters.charset
- HTTP element charset.
-
getContentCharset
public static java.lang.String getContentCharset(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.HTTP_CONTENT_CHARSET
parameter. 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_CHARSET
parameter.- Parameters:
params
- HTTP parameters.charset
- HTTP content charset.
-
getVersion
public static ProtocolVersion getVersion(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.PROTOCOL_VERSION
parameter. 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_VERSION
parameter.- Parameters:
params
- HTTP parameters.version
- HTTP protocol version.
-
getUserAgent
public static java.lang.String getUserAgent(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.USER_AGENT
parameter. 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_AGENT
parameter.- Parameters:
params
- HTTP parameters.useragent
- User agent string.
-
useExpectContinue
public static boolean useExpectContinue(HttpParams params)
Deprecated.Obtains value of theCoreProtocolPNames.USE_EXPECT_CONTINUE
parameter. 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_CONTINUE
parameter.- 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_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.Sets value of theCoreProtocolPNames.HTTP_MALFORMED_INPUT_ACTION
parameter.- 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_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 theCoreProtocolPNames.HTTP_UNMAPPABLE_INPUT_ACTION
parameter.- Parameters:
params
- HTTP parametersaction
- action to perform on un mappable inputs- Since:
- 4.2
-
-