Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Encoding Type is not set when sending Request object set as POST #6958

Closed
imel96 opened this issue Dec 5, 2014 · 1 comment
Closed

Encoding Type is not set when sending Request object set as POST #6958

imel96 opened this issue Dec 5, 2014 · 1 comment
Assignees
Milestone

Comments

@imel96
Copy link
Contributor

imel96 commented Dec 5, 2014

Zend\Http\Client throws exception when trying to send a Request object (which has method set as POST) and the Client itself is not set to use POST or Client::setMethod() hasn't been called.

Zend\Http\Client\Exception\RuntimeException: Cannot handle content type '' automatically
Zend/Http/Client.php:1219
Zend/Http/Client.php:858

Work around is to call Client::setMethod() so Encoding Type is set before calling Client::send(Request)

@Ocramius
Copy link
Member

Linking #6959 (fixed there)

@Ocramius Ocramius self-assigned this Dec 16, 2014
@Ocramius Ocramius added this to the 2.3.4 milestone Dec 16, 2014
gianarb pushed a commit to zendframework/zend-http that referenced this issue May 15, 2015
…hen sending Request

Call setMethod() so Encoding Type is set.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants