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.

$this->request->getDelete() ?

How to get data from DELETE request? I see on stackoverflow the process to get data from DELETE request is same with the process to get data from PUT request. I have tried $thiis->request->getPut() it is not working.



24.1k
Accepted
answer

$this->request->getPut() works. But you are right, there isn't a getDelete() method. Try using $this->request->get() to maybe get a workaround.

@phalcon



90.1k

That depends on how you pass the data from the client, if you do so in JSON, $this->request->getPut() should work for you



6.7k
edited Nov '14

I have tried JSON data, it also not working, $this->request->getPut() always return null

That depends on how you pass the data from the client, if you do so in JSON, $this->request->getPut() should work for you



6.7k

using query string as @RompePC described :)

thanks everyone