New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PUT parameters only work in JSON format #362
Comments
I have a similar problem, but it does not work even with json format. If I use $ this->get(); works perfect, but if I use $this->put (); returns me the following error: Message: Undefined property: Locals::$put |
@normeno commented on 25 de oct de 2014 07:58 GMT+02:00:
Have you added the Content-Type: application/json header? If not, the server might try parsing the request as a form and fail. |
Hello, Can you please send me the output of this code for your put request:
|
parse_str(file_get_contents("php://input"),$put_vars); return array(0) { |
Thanks for sending that. Basically that is showing that Apache is not getting any PUT data. So, if Apache doesn't it's getting anything, then the REST-Server won't either. I would take a look at either your web server config or the client code itself. Chris |
I've been used $this->get() and $this->post() and everything works fine, but $this->put() doesn't work.
Example:
Request
Php
Response
Expected
Maybe related to #354 and #252
$this->put() works fine if the PUT request is sent in json format, e.g:
Is this behaviour intended?
The text was updated successfully, but these errors were encountered: