Hi.

I have some problem. I need to do Rest POST request with xml data,
enctype set to text/xml.
It is impossible.

In _performPost() we have:
[...]
$client->setRawData($data);
[...]

which set enctype to null, beacouse of Zend_Http_Client:

public function setRawData($data, $enctype = null)
{
    $this->raw_post_data = $data;
    $this->setEncType($enctype);
    [...]
}

and:

public function setEncType($enctype = self::ENC_URLENCODED)
{
    $this->enctype = $enctype;
    return $this;
}

So we always have enctype set to: application/x-www-form-urlencoded
I think bug is in Http_Client, it should check
Zend_Http_Client::enctype in setRawData if null was given.

In issue tracker I find related issue, but i think it's bug not
improvement, and in Http Client, not Rest Client.
http://www.framework.zend.com/issues/browse/ZF-6306?page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel

Kind regards,

-- 
Paweł Chuchmała
pawel.chuchmala at gmail dot com

Reply via email to