51. Class

51.1. Zend\Http\Client\Adapter\Proxy

HTTP Proxy-supporting Zend_Http_Client adapter class, based on the default socket based adapter.

Should be used if proxy HTTP access is required. If no proxy is set, will fall back to Zend_Http_Client_Adapter_Socket behavior. Just like the default Socket adapter, this adapter does not require any special extensions installed.

51.1.1. Methods

51.1.1.1. setOptions

setOptions()

Set the configuration array for the adapter

Parameters:array

51.1.1.2. connect

connect()

Connect to the remote server

Will try to connect to the proxy server. If no proxy was set, will fall back to the target server (behave like regular Socket adapter)

Parameters:
  • string
  • int
  • bool
Throws AdapterExceptionRuntimeException:
 

51.1.1.3. write

write()

Send request to the proxy server

Parameters:
  • string
  • ZendUriUri
  • string
  • array
  • string
Throws AdapterExceptionRuntimeException:
 
Return type:

string Request as string

51.1.1.4. connectHandshake

connectHandshake()

Preform handshaking with HTTPS proxy using CONNECT method

Parameters:
  • string
  • integer
  • string
  • array
Throws AdapterExceptionRuntimeException:
 

51.1.1.5. close

close()

Close the connection to the server

51.1.1.6. __destruct

__destruct()

Destructor: make sure the socket is disconnected

Project Versions

Table Of Contents

Previous topic

50. Class

Next topic

52. Class

This Page