Thursday, 29 March, 2007

Zend Gdata PUT request

Reference at Zend_Gdata.

Currently, GData only allow POST as request method and not PUT, issue link

PUT is needed! We can just use the existing post method. :D Here is what I modify (for the time being)

public function post($xml, $uri = null)

{

return $this->request($xml, $uri, 'POST');

}

public function put($xml, $uri = null)

{

return $this->request($xml, $uri, 'PUT');

}

public function request($xml, $uri = null, $method = 'POST')

{

..

$response = $this->_httpClient->request($method);

The original post method is renamed to request with an additional argument $method and also replacing those 'POST' with $method.



Reactions

skyleecm | 2007-03-29 21:39 |

For windows, need to enable openssl in php.ini (need to use https)

extension=php_openssl.dll