Package org.apache.commons.httpclient
Class ProxyClient
java.lang.Object
org.apache.commons.httpclient.ProxyClient
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.
A client that provides
sockets for communicating through HTTP proxies
via the HTTP CONNECT method. This is primarily needed for non-HTTP protocols that wish to
communicate via an HTTP proxy.- Since:
- 3.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.Contains the method used to execute the connect along with the created socket. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Creates an instance of ProxyClient using defaultparameter set.ProxyClient(HttpClientParams params) Deprecated.Creates an instance of ProxyClient using the givenparameter set. -
Method Summary
Modifier and TypeMethodDescriptionconnect()Deprecated.Creates a socket that is connected, via the HTTP CONNECT method, to a proxy.Deprecated.Returns thehost configurationassociated with the ProxyClient.Deprecated.ReturnsHTTP protocol parametersassociated with this ProxyClient.getState()Deprecated.ReturnsHTTP stateassociated with the ProxyClient.voidsetHostConfiguration(HostConfiguration hostConfiguration) Deprecated.Assigns thehost configurationto use with the ProxyClient.voidsetParams(HttpClientParams params) Deprecated.AssignsHTTP protocol parametersfor this ProxyClient.voidDeprecated.AssignsHTTP statefor the ProxyClient.
-
Constructor Details
-
ProxyClient
public ProxyClient()Deprecated.Creates an instance of ProxyClient using defaultparameter set.- See Also:
-
ProxyClient
Deprecated.Creates an instance of ProxyClient using the givenparameter set.- Parameters:
params- Theparametersto use.- See Also:
-
-
Method Details
-
getState
Deprecated.ReturnsHTTP stateassociated with the ProxyClient.- Returns:
- the shared client state
- See Also:
-
setState
Deprecated.AssignsHTTP statefor the ProxyClient.- Parameters:
state- the newHTTP statefor the client- See Also:
-
getHostConfiguration
Deprecated.Returns thehost configurationassociated with the ProxyClient.- Returns:
host configuration
-
setHostConfiguration
Deprecated.Assigns thehost configurationto use with the ProxyClient.- Parameters:
hostConfiguration- Thehost configurationto set
-
getParams
Deprecated.ReturnsHTTP protocol parametersassociated with this ProxyClient.- See Also:
-
setParams
Deprecated.AssignsHTTP protocol parametersfor this ProxyClient.- See Also:
-
connect
Deprecated.Creates a socket that is connected, via the HTTP CONNECT method, to a proxy.Even though HTTP CONNECT proxying is generally used for HTTPS tunneling, the returned socket will not have been wrapped in an SSL socket.
Both the proxy and destination hosts must be set via the
host configurationprior to calling this method.- Returns:
- the connect response
- Throws:
IOExceptionHttpException- See Also:
-