Class Apache5HttpRequest (1.45.2)

public final class Apache5HttpRequest extends LowLevelHttpRequest

Inheritance

java.lang.Object > LowLevelHttpRequest > Apache5HttpRequest

Methods

addHeader(String name, String value)

public void addHeader(String name, String value)

Adds a header to the HTTP request.

Note that multiple headers of the same name need to be supported, in which case #addHeader will be called for each instance of the header.

Parameters
Name Description
name String
value String
Overrides

execute()

public LowLevelHttpResponse execute()

Executes the request and returns a low-level HTTP response object.

Returns
Type Description
LowLevelHttpResponse
Overrides
Exceptions
Type Description
IOException

setTimeout(int connectTimeout, int readTimeout)

public void setTimeout(int connectTimeout, int readTimeout)

Sets the connection and read timeouts.

Default implementation does nothing, but subclasses should normally override.

Parameters
Name Description
connectTimeout int
readTimeout int
Overrides
Exceptions
Type Description
IOException