Skip to content
jrbasso edited this page Dec 11, 2010 · 11 revisions

The HttpSocket class has undergone some changes.

Don't change the header keys

Following others places in core, the HttpSocket do not change the helpers. The RFC 2616 says that helpers are case insensitive.

So, if your server send the below header: @@@ HTTP/1.1 200 OK Date: Mon, 16 Apr 2007 04:14:16 GMT server: CakeHttp Server content-tyPe: text/html @@@

You $http->response['header'] will be: @@@ Array( 'Date' => 'Mon, 16 Apr 2007 04:14:16 GMT', 'server' => 'CakeHttp Server', 'content-tyPe' => 'text/html' ) @@@

Returning as reference

The methods get(), post(), put(), delete() and request() now returns the content as reference. It is good when the server response is big. The reference is to $http->response['body']. To use it, you need receive the result with reference, for example: @@@ $response =& $http->get('http://www.cakephp.org'); @@@

Download

Independent cookie by host

Authentication methods

Now you can create your authentication method to use with HttpSocket.

Support to Proxy

Clone this wiki locally