An interface description for Zend\Http\Client\Adapter classes.

These classes are used as connectors for Zend\Http\Client, performing the tasks of connecting, writing, reading and closing connection to the server.

package Default

 Methods

Close the connection to the server

close() 

Connect to the remote server

connect(string $host, integer $port = 80, boolean $secure = false

Parameters

$host

string

$port

integer

$secure

boolean

Read response from server

read() : string

Returns

string

Set the configuration array for the adapter

setOptions(array $options = array()

Parameters

$options

array

Send request to the remote server

write(string $method, \Zend\Uri\Uri $url, string $httpVer = '1.1', array $headers = array(), string $body = '') : string

Parameters

$method

string

$url

\Zend\Uri\Uri

$httpVer

string

$headers

array

$body

string

Returns

stringRequest as text