Class ExpectContinueMethod
- java.lang.Object
-
- org.apache.commons.httpclient.HttpMethodBase
-
- org.apache.commons.httpclient.methods.ExpectContinueMethod
-
- All Implemented Interfaces:
HttpMethod
- Direct Known Subclasses:
EntityEnclosingMethod
,MultipartPostMethod
@Deprecated public abstract class ExpectContinueMethod extends HttpMethodBase
Deprecated.Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project. It is not recommended to use it in any new code. Instead, use HTTP client API plugins as a dependency in your code. E.g. Apache HttpComponents Client API 4.x Plugin or Async HTTP Client Plugin.This abstract class serves as a foundation for all HTTP methods that support 'Expect: 100-continue' handshake.
The purpose of the 100 (Continue) status (refer to section 10.1.1 of the RFC 2616 for more details) is to allow a client that is sending a request message with a request body to determine if the origin server is willing to accept the request (based on the request headers) before the client sends the request body. In some cases, it might either be inappropriate or highly inefficient for the client to send the body if the server will reject the message without looking at the body.
'Expect: 100-continue' handshake should be used with caution, as it may cause problems with HTTP servers and proxies that do not support HTTP/1.1 protocol.
- Since:
- 2.0beta1
-
-
Constructor Summary
Constructors Constructor Description ExpectContinueMethod()
Deprecated.No-arg constructor.ExpectContinueMethod(java.lang.String uri)
Deprecated.Constructor specifying a URI.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
getUseExpectHeader()
Deprecated.UseHttpMethodParams
void
setUseExpectHeader(boolean value)
Deprecated.UseHttpMethodParams
-
Methods inherited from class org.apache.commons.httpclient.HttpMethodBase
abort, addRequestHeader, addRequestHeader, addResponseFooter, execute, getAuthenticationRealm, getDoAuthentication, getEffectiveVersion, getFollowRedirects, getHostAuthState, getHostConfiguration, getMethodRetryHandler, getName, getParams, getPath, getProxyAuthenticationRealm, getProxyAuthState, getQueryString, getRecoverableExceptionCount, getRequestCharSet, getRequestHeader, getRequestHeaders, getRequestHeaders, getResponseBody, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseBodyAsString, getResponseCharSet, getResponseContentLength, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaders, getResponseHeaders, getStatusCode, getStatusLine, getStatusText, getURI, hasBeenUsed, isAborted, isHttp11, isRequestSent, isStrictMode, recycle, releaseConnection, removeRequestHeader, removeRequestHeader, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setMethodRetryHandler, setParams, setPath, setQueryString, setQueryString, setRequestHeader, setRequestHeader, setStrictMode, setURI, validate
-
-
-
-
Method Detail
-
getUseExpectHeader
public boolean getUseExpectHeader()
Deprecated.UseHttpMethodParams
Returns true if the 'Expect: 100-Continue' handshake is activated. The purpose of the 'Expect: 100-Continue' handshake to allow a client that is sending a request message with a request body to determine if the origin server is willing to accept the request (based on the request headers) before the client sends the request body.
- Returns:
- true if 'Expect: 100-Continue' handshake is to be used, false otherwise.
- Since:
- 2.0beta1
- See Also:
HttpMethodBase.getParams()
,HttpMethodParams
,HttpMethodParams.USE_EXPECT_CONTINUE
-
setUseExpectHeader
public void setUseExpectHeader(boolean value)
Deprecated.UseHttpMethodParams
Activates 'Expect: 100-Continue' handshake. The purpose of the 'Expect: 100-Continue' handshake to allow a client that is sending a request message with a request body to determine if the origin server is willing to accept the request (based on the request headers) before the client sends the request body.
The use of the 'Expect: 100-continue' handshake can result in noticable peformance improvement for entity enclosing requests (such as POST and PUT) that require the target server's authentication.
'Expect: 100-continue' handshake should be used with caution, as it may cause problems with HTTP servers and proxies that do not support HTTP/1.1 protocol.
- Parameters:
value
- boolean value- Since:
- 2.0beta1
- See Also:
HttpMethodBase.getParams()
,HttpMethodParams
,HttpMethodParams.USE_EXPECT_CONTINUE
-
-