org.restlet.engine.http

## Class HttpClientHelper

- java.lang.Object
- - org.restlet.engine.Helper
  - - org.restlet.engine.RestletHelper<T>
    - - org.restlet.engine.ConnectorHelper<Client>
      - - org.restlet.engine.ClientHelper
        - - org.restlet.engine.http.HttpClientHelper

    public abstract class HttpClientHelper
    extends ClientHelper

Base HTTP client connector. Here is the list of parameters that are supported. They should be set in the Client's context before it is started:

Parameter name | Value type | Default value | Description
--- | --- | --- | ---
adapter | String | org.restlet.engine.http.ClientAdapter | Class name of the adapter of low-level HTTP calls into high level requests and responses.

Author:
  Jerome Louvel

### Constructor Summary

Constructors
Constructor and Description
`HttpClientHelper(Client client)` Constructor.

### Method Summary

Methods
`abstract ClientCall` `create(Request request)` Creates a low-level HTTP client call from a high-level request.
`ClientAdapter` `getAdapter()` Returns the adapter from uniform calls to HTTP calls.
`void` `handle(Request request, Response response)` Handles a call.
`void` `setAdapter(ClientAdapter adapter)` Sets the adapter from uniform calls to HTTP calls.

### Methods inherited from class org.restlet.engine.ClientHelper

`getConnectTimeout`

### Methods inherited from class org.restlet.engine.ConnectorHelper

`getConnectorService, getContext, getProtocols, start, stop, update`

### Methods inherited from class org.restlet.engine.RestletHelper

`getAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelped`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### HttpClientHelper

    public HttpClientHelper(Client client)

Constructor.

Parameters:
  `client` - The client to help.

### Method Detail

#### create

    public abstract ClientCall create(Request request)

Creates a low-level HTTP client call from a high-level request.

Parameters:
  `request` - The high-level request.
Returns:
  A low-level HTTP client call.

#### getAdapter

    public ClientAdapter getAdapter()
                             throws java.lang.Exception

Returns the adapter from uniform calls to HTTP calls.

Returns:
  the adapter from uniform calls to HTTP calls.
Throws:
  `java.lang.Exception`

#### handle

    public void handle(Request request,
              Response response)

Description copied from class: `RestletHelper`
Handles a call.

Overrides:
  `handle` in class `RestletHelper<Client>`
Parameters:
  `request` - The request to handle.
  `response` - The response to update.

#### setAdapter

    public void setAdapter(ClientAdapter adapter)

Sets the adapter from uniform calls to HTTP calls.

Parameters:
  `adapter` - The adapter to set.