Package org.apache.http.params
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
Note that the implements relation to
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
-
Field Summary
Fields inherited from interface org.apache.http.params.CoreProtocolPNames
HTTP_CONTENT_CHARSET, HTTP_ELEMENT_CHARSET, ORIGIN_SERVER, PROTOCOL_VERSION, STRICT_TRANSFER_ENCODING, USE_EXPECT_CONTINUE, USER_AGENT, WAIT_FOR_CONTINUE -
Method Summary
Modifier and Type Method Description static StringgetContentCharset(HttpParams params)Returns the default charset to be used for writing content body, when no charset explicitly specified.static StringgetHttpElementCharset(HttpParams params)Returns the charset to be used for writing HTTP headers.static StringgetUserAgent(HttpParams params)static ProtocolVersiongetVersion(HttpParams params)Returnsprotocol versionto be used per default.static voidsetContentCharset(HttpParams params, String charset)Sets the default charset to be used for writing content body, when no charset explicitly specified.static voidsetHttpElementCharset(HttpParams params, String charset)Sets the charset to be used for writing HTTP headers.static voidsetUseExpectContinue(HttpParams params, boolean b)static voidsetUserAgent(HttpParams params, String useragent)static voidsetVersion(HttpParams params, ProtocolVersion version)Assigns theprotocol versionto be used by the HTTP methods that this collection of parameters applies to.static booleanuseExpectContinue(HttpParams params)
-
Method Details
-
getHttpElementCharset
Returns the charset to be used for writing HTTP headers.- Returns:
- The charset
-
setHttpElementCharset
Sets the charset to be used for writing HTTP headers.- Parameters:
charset- The charset
-
getContentCharset
Returns the default charset to be used for writing content body, when no charset explicitly specified.- Returns:
- The charset
-
setContentCharset
Sets the default charset to be used for writing content body, when no charset explicitly specified.- Parameters:
charset- The charset
-
getVersion
Returnsprotocol versionto be used per default.- Returns:
protocol version
-
setVersion
Assigns theprotocol versionto be used by the HTTP methods that this collection of parameters applies to.- Parameters:
version- theprotocol version
-
getUserAgent
-
setUserAgent
-
useExpectContinue
-
setUseExpectContinue
-