compared with
Version 9 by Shahar Evron
on Feb 28, 2010 12:26.

This line was removed.
This word was removed. This word was added.
This line was added.

Changes (7)

View Page History
The ZF 2.0 HTTP component family will be organized in the following structure:

h5. Messages: ||Messages: Request and Response objects||
*Zend\Http\Message* will be an abstract class defining the shared properties of HTTP messages (requests and responses) including their headers, body, etc. It will have two concrete implementations:
* *Zend\Http\Request* which will represent a single, self-contained HTTP request
In contrast to the ZF 1.0 implementation, simple HTTP requests could be sent by simply instantiating a request object and sending it through a transport object, without creating the more complex and feature rich Client object.

h5. The Transport Layer
||The Transport Layer||
Sending and receiving HTTP messages to and from HTTP servers will be handled through dedicated Transport objects, in a much similar fashion to how ZF 1.0 Zend_Http_Client_Adapter classes work. All Transport classes will inherit from single abstract class or interface, and will implement the ability to manage connections and to send request messages and receive response messages. Different concrete *Zend\Http\Transport* implementation could be based on different underlying infrastructure such as native sockets, cURL, pecl_http etc.

* Transport objects will not attempt to automatically handle different protocol negotiation issues that require more than one request to be sent or acting upon an unexpected or special response - for example, sending two requests in order to facilitate the HTTP CONNECT method for HTTPS proxying. This will be left to Client objects.

h5. The Client class
||The Client class||
Client objects will encapsulate all the more complex HTTP communication logic which is beyond the scope of simple, single HTTP request and response. For example, the following functionality will be handled by the HTTP Client class:
* Automatic redirection response handling
The Client class will also provide some convenience methods to quickly send HTTP requests of common types (GET, POST, PUT, DELETE).

h5. Auxiliary Classes
||Auxiliary Classes||
Additional auxiliary classes could be implemented if needed. The following classes are considered:
* Zend\Http\Cookie - representation an HTTP cookie