Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Is there way to access HTTP PUT-parameters with \Phalcon framework?


We want to implement full REST in our application (this is means we want to enable "PUT" and "DELETE" queries in the API).

There is one trouble with "PUT"-query parameters: Payload parameters of HTTP-PUT-request does not exists In the $_GLOABALS. So we can't access them through $this->request->get() ($this->request is \Phalcon\Http\Request).

But if we read 'php://input' we can see all passed "PUT"-parameters. Is there way to access parameters with \Phalcon framework or we need to parse "manually" every "PUT"-request?


To my knowledge the Request object does not handle those. In a similar project as yours I had to rely on php://input to give me the functionality I wanted when issuing a PUT.


Thank you. We do the same now.

There is interesting feature: If we set $GLOBALS["PUT"] manually then $this->request->get() returns data from $_PUT array correctly :).