public interface Client
A simple interface for an HTTP client, providing a generic API that can be implemented using any HTTP client library, to make this client library fully portable.
BrightpearlApiClient requests a Client instance from ClientFactory every
time it makes a request to the Brightpearl API. This allows support for HTTP clients that can only be used once or
cannot support concurrent requests.
Implementations should not attempt to handle unexpected response codes; if a response was received from
the remote server with any status code, this method should return without throwing an exception. BrightpearlApiClient
handles interpretation of unexpected status codes. An exception should only be thrown if there is a failure to
connect to the remote server or an exception while processing the response. The recommended exception to throw in
these cases is BrightpearlHttpException.
Response execute(Request request)
BrightpearlHttpException should be thrown.request - The request to be executed.Copyright © 2014. All Rights Reserved.