ClientInterface
                
            in
            
        
    
        
            HTTP client interface
Tags
Table of Contents
- addRequestHeader() : ClientInterface
 - Add request header
 - addRequestHeaders() : ClientInterface
 - Add request headers
 - addResponseHeader() : ClientInterface
 - Add response header
 - addResponseHeaders() : ClientInterface
 - Add response headers
 - appendToUrl() : ClientInterface
 - Append to the URL
 - createAsJson() : ClientInterface
 - Create request as JSON
 - createAsXml() : ClientInterface
 - Create request as XML
 - createMultipartForm() : ClientInterface
 - Create request as a multipart form
 - createUrlEncodedForm() : ClientInterface
 - Create request as a URL-encoded form
 - getField() : mixed
 - Get a field
 - getFields() : array<string|int, mixed>
 - Get all field
 - getMethod() : string
 - Get the method
 - getRequest() : Request
 - Get the request object
 - getRequestBody() : string
 - Get the request body
 - getRequestHeader() : mixed
 - Get the request header
 - getRequestHeaders() : array<string|int, mixed>
 - Get the request headers
 - getResource() : resource
 - Get the resource
 - getResponse() : Response
 - Get the response object
 - getResponseBody() : string
 - Get the response body
 - getResponseCode() : string
 - Get the response code
 - getResponseHeader() : mixed
 - Get the response header
 - getResponseHeaders() : array<string|int, mixed>
 - Get the response headers
 - getUrl() : string
 - Get the URL
 - hasRequest() : bool
 - Has request object
 - hasRequestHeader() : bool
 - Has request header
 - hasRequestHeaders() : bool
 - Has request headers
 - hasResource() : bool
 - Determine whether or not resource is available
 - hasResponse() : bool
 - Has response object
 - hasResponseHeader() : bool
 - Has response header
 - hasResponseHeaders() : bool
 - Has response headers
 - isJson() : bool
 - Check if request is JSON
 - isMultipartForm() : bool
 - Check if request is a multipart form
 - isUrlEncodedForm() : bool
 - Check if request is a URL-encoded form
 - isXml() : bool
 - Check if request is XML
 - open() : ClientInterface
 - Create and open the client resource
 - removeField() : ClientInterface
 - Remove a field
 - removeFields() : ClientInterface
 - Remove all fields
 - request() : Request
 - Get the request object (alias method)
 - reset() : ClientInterface
 - Method to reset the client object
 - resource() : resource
 - Get the resource (alias method)
 - response() : Response
 - Get the response object (alias method)
 - send() : void
 - Method to send the request and get the response
 - setField() : ClientInterface
 - Set a field
 - setFields() : ClientInterface
 - Set all fields
 - setMethod() : ClientInterface
 - Set the method
 - setRequest() : ClientInterface
 - Set the request object
 - setResponse() : ClientInterface
 - Set the response object
 - setUrl() : ClientInterface
 - Set the URL
 - throwError() : void
 - Throw an exception upon an error.
 
Methods
addRequestHeader()
Add request header
    public
                    addRequestHeader(string $name, string $value) : ClientInterface
    
        Parameters
- $name : string
 - $value : string
 
Return values
ClientInterface —addRequestHeaders()
Add request headers
    public
                    addRequestHeaders(array<string|int, mixed> $headers) : ClientInterface
    
        Parameters
- $headers : array<string|int, mixed>
 
Return values
ClientInterface —addResponseHeader()
Add response header
    public
                    addResponseHeader(string $name, string $value) : ClientInterface
    
        Parameters
- $name : string
 - $value : string
 
Return values
ClientInterface —addResponseHeaders()
Add response headers
    public
                    addResponseHeaders(array<string|int, mixed> $headers) : ClientInterface
    
        Parameters
- $headers : array<string|int, mixed>
 
Return values
ClientInterface —appendToUrl()
Append to the URL
    public
                    appendToUrl(string $url) : ClientInterface
    
        Parameters
- $url : string
 
Return values
ClientInterface —createAsJson()
Create request as JSON
    public
                    createAsJson() : ClientInterface
    
    
    
        Return values
ClientInterface —createAsXml()
Create request as XML
    public
                    createAsXml() : ClientInterface
    
    
    
        Return values
ClientInterface —createMultipartForm()
Create request as a multipart form
    public
                    createMultipartForm() : ClientInterface
    
    
    
        Return values
ClientInterface —createUrlEncodedForm()
Create request as a URL-encoded form
    public
                    createUrlEncodedForm() : ClientInterface
    
    
    
        Return values
ClientInterface —getField()
Get a field
    public
                    getField(string $name) : mixed
    
        Parameters
- $name : string
 
Return values
mixed —getFields()
Get all field
    public
                    getFields() : array<string|int, mixed>
    
    
    
        Return values
array<string|int, mixed> —getMethod()
Get the method
    public
                    getMethod() : string
    
    
    
        Return values
string —getRequest()
Get the request object
    public
                    getRequest() : Request
    
    
    
        Return values
Request —getRequestBody()
Get the request body
    public
                    getRequestBody() : string
    
    
    
        Return values
string —getRequestHeader()
Get the request header
    public
                    getRequestHeader(string $name) : mixed
    
        Parameters
- $name : string
 
Return values
mixed —getRequestHeaders()
Get the request headers
    public
                    getRequestHeaders() : array<string|int, mixed>
    
    
    
        Return values
array<string|int, mixed> —getResource()
Get the resource
    public
                    getResource() : resource
    
    
    
        Return values
resource —getResponse()
Get the response object
    public
                    getResponse() : Response
    
    
    
        Return values
Response —getResponseBody()
Get the response body
    public
                    getResponseBody() : string
    
    
    
        Return values
string —getResponseCode()
Get the response code
    public
                    getResponseCode() : string
    
    
    
        Return values
string —getResponseHeader()
Get the response header
    public
                    getResponseHeader(string $name) : mixed
    
        Parameters
- $name : string
 
Return values
mixed —getResponseHeaders()
Get the response headers
    public
                    getResponseHeaders() : array<string|int, mixed>
    
    
    
        Return values
array<string|int, mixed> —getUrl()
Get the URL
    public
                    getUrl() : string
    
    
    
        Return values
string —hasRequest()
Has request object
    public
                    hasRequest() : bool
    
    
    
        Return values
bool —hasRequestHeader()
Has request header
    public
                    hasRequestHeader(string $name) : bool
    
        Parameters
- $name : string
 
Return values
bool —hasRequestHeaders()
Has request headers
    public
                    hasRequestHeaders() : bool
    
    
    
        Return values
bool —hasResource()
Determine whether or not resource is available
    public
                    hasResource() : bool
    
    
    
        Return values
bool —hasResponse()
Has response object
    public
                    hasResponse() : bool
    
    
    
        Return values
bool —hasResponseHeader()
Has response header
    public
                    hasResponseHeader(string $name) : bool
    
        Parameters
- $name : string
 
Return values
bool —hasResponseHeaders()
Has response headers
    public
                    hasResponseHeaders() : bool
    
    
    
        Return values
bool —isJson()
Check if request is JSON
    public
                    isJson() : bool
    
    
    
        Return values
bool —isMultipartForm()
Check if request is a multipart form
    public
                    isMultipartForm() : bool
    
    
    
        Return values
bool —isUrlEncodedForm()
Check if request is a URL-encoded form
    public
                    isUrlEncodedForm() : bool
    
    
    
        Return values
bool —isXml()
Check if request is XML
    public
                    isXml() : bool
    
    
    
        Return values
bool —open()
Create and open the client resource
    public
                    open() : ClientInterface
    
    
    
        Return values
ClientInterface —removeField()
Remove a field
    public
                    removeField(string $name) : ClientInterface
    
        Parameters
- $name : string
 
Return values
ClientInterface —removeFields()
Remove all fields
    public
                    removeFields() : ClientInterface
    
    
    
        Return values
ClientInterface —request()
Get the request object (alias method)
    public
                    request() : Request
    
    
    
        Return values
Request —reset()
Method to reset the client object
    public
                    reset() : ClientInterface
    
    
    
        Return values
ClientInterface —resource()
Get the resource (alias method)
    public
                    resource() : resource
    
    
    
        Return values
resource —response()
Get the response object (alias method)
    public
                    response() : Response
    
    
    
        Return values
Response —send()
Method to send the request and get the response
    public
                    send() : void
    
    
    
        Return values
void —setField()
Set a field
    public
                    setField(string $name, mixed $value) : ClientInterface
    
        Parameters
- $name : string
 - $value : mixed
 
Return values
ClientInterface —setFields()
Set all fields
    public
                    setFields(array<string|int, mixed> $fields) : ClientInterface
    
        Parameters
- $fields : array<string|int, mixed>
 
Return values
ClientInterface —setMethod()
Set the method
    public
                    setMethod(string $method[, bool $strict = true ]) : ClientInterface
    
        Parameters
- $method : string
 - $strict : bool = true
 
Tags
Return values
ClientInterface —setRequest()
Set the request object
    public
                    setRequest(Request $request) : ClientInterface
    
        Parameters
- $request : Request
 
Return values
ClientInterface —setResponse()
Set the response object
    public
                    setResponse(Response $response) : ClientInterface
    
        Parameters
- $response : Response
 
Return values
ClientInterface —setUrl()
Set the URL
    public
                    setUrl(string $url) : ClientInterface
    
        Parameters
- $url : string
 
Return values
ClientInterface —throwError()
Throw an exception upon an error.
    public
                    throwError(string $error) : void
    
        Parameters
- $error : string