PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Configuration Parameters

The constructor and setConfig() method accept an associative array of configuration parameters, or a Zend_Config object. Setting these parameters is optional, as they all have default values.

Table 78. Zend_Http_Client configuration parameters

Parameter Description Expected Values Default Value
maxredirects Maximum number of redirections to follow (0 = none) integer 5
strict Whether perform validation on header names. When set to FALSE, validation functions will be skipped. Usually this should not be changed boolean TRUE
strictredirects Whether to strictly follow the RFC when redirecting (see this section) boolean FALSE
useragent User agent identifier string (sent in request headers) string 'Zend_Http_Client'
timeout Connection timeout (seconds) integer 10
httpversion HTTP protocol version (usually '1.1' or '1.0') string '1.1'
adapter Connection adapter class to use (see this section) mixed 'Zend_Http_Client_Adapter_Socket'
keepalive Whether to enable keep-alive connections with the server. Useful and might improve performance if several consecutive requests to the same server are performed. boolean FALSE
storeresponse Whether to store last response for later retrieval with getLastResponse(). If set to FALSE getLastResponse() will return NULL. boolean TRUE
encodecookies Whether to pass the cookie value through urlencode/urldecode. Enabling this breaks support with some web servers. Disabling this limits the range of values the cookies can contain. boolean TRUE


Zend Framework