Package org.apache.commons.httpclient
Class ConnectMethod
- java.lang.Object
-
- org.apache.commons.httpclient.HttpMethodBase
-
- org.apache.commons.httpclient.ConnectMethod
-
- All Implemented Interfaces:
HttpMethod
@Deprecated public class ConnectMethod 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.Establishes a tunneled HTTP connection via the CONNECT method.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMEDeprecated.the name of this method
-
Constructor Summary
Constructors Constructor Description ConnectMethod()Deprecated.use #ConnectMethod(HttpHost); Create a connect method.ConnectMethod(HostConfiguration targethost)Deprecated.Create a connect method.ConnectMethod(HttpMethod method)Deprecated.the wrapped method is no longer used Create a connect method wrapping the existing method
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intexecute(HttpState state, HttpConnection conn)Deprecated.Execute this method and create a tunneled HttpConnection.java.lang.StringgetName()Deprecated.Provide thenameof this method.java.lang.StringgetPath()Deprecated.Gets the path of this HTTP method.URIgetURI()Deprecated.Returns the URI of the HTTP method-
Methods inherited from class org.apache.commons.httpclient.HttpMethodBase
abort, addRequestHeader, addRequestHeader, addResponseFooter, getAuthenticationRealm, getDoAuthentication, getEffectiveVersion, getFollowRedirects, getHostAuthState, getHostConfiguration, getMethodRetryHandler, getParams, getProxyAuthenticationRealm, getProxyAuthState, getQueryString, getRecoverableExceptionCount, getRequestCharSet, getRequestHeader, getRequestHeaders, getRequestHeaders, getResponseBody, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseBodyAsString, getResponseCharSet, getResponseContentLength, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaders, getResponseHeaders, getStatusCode, getStatusLine, getStatusText, hasBeenUsed, isAborted, isHttp11, isRequestSent, isStrictMode, recycle, releaseConnection, removeRequestHeader, removeRequestHeader, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setMethodRetryHandler, setParams, setPath, setQueryString, setQueryString, setRequestHeader, setRequestHeader, setStrictMode, setURI, validate
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
Deprecated.the name of this method- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConnectMethod
public ConnectMethod()
Deprecated.use #ConnectMethod(HttpHost); Create a connect method.- Since:
- 3.0
-
ConnectMethod
public ConnectMethod(HttpMethod method)
Deprecated.the wrapped method is no longer used Create a connect method wrapping the existing method- Parameters:
method- themethodto execute after connecting to the server
-
ConnectMethod
public ConnectMethod(HostConfiguration targethost)
Deprecated.Create a connect method.- Since:
- 3.0
-
-
Method Detail
-
getName
public java.lang.String getName()
Deprecated.Provide thenameof this method.- Specified by:
getNamein interfaceHttpMethod- Specified by:
getNamein classHttpMethodBase- Returns:
- the String "CONNECT"
-
getPath
public java.lang.String getPath()
Deprecated.Description copied from class:HttpMethodBaseGets the path of this HTTP method. Calling this method after the request has been executed will return the actual path, following any redirects automatically handled by this HTTP method.- Specified by:
getPathin interfaceHttpMethod- Overrides:
getPathin classHttpMethodBase- Returns:
- the path to request or "/" if the path is blank.
-
getURI
public URI getURI() throws URIException
Deprecated.Description copied from class:HttpMethodBaseReturns the URI of the HTTP method- Specified by:
getURIin interfaceHttpMethod- Overrides:
getURIin classHttpMethodBase- Returns:
- The URI
- Throws:
URIException- If the URI cannot be created.- See Also:
HttpMethod.getURI()
-
execute
public int execute(HttpState state, HttpConnection conn) throws java.io.IOException, HttpException
Deprecated.Execute this method and create a tunneled HttpConnection. If the method is successful (i.e. the status is a 2xx) tunnelCreated() will be called on the connection.- Specified by:
executein interfaceHttpMethod- Overrides:
executein classHttpMethodBase- Parameters:
state- the current http stateconn- the connection to write to- Returns:
- the http status code from execution
- Throws:
HttpException- when an error occurs writing the headersjava.io.IOException- when an error occurs writing the headers- See Also:
HttpConnection.tunnelCreated()
-
-