T
T
tytar2013-08-07 23:35:26
Kohana
tytar, 2013-08-07 23:35:26

How to get passed data by PUT/PATCH/DELETE methods in kohana 3?

Good afternoon!
I am developing the client side on backbone.js, there is CRUD, and it sends PUT / PATCH and DELETE requests, but kohana can only accept GET / POST ->query() / ->post()
"in haste" I receive data passed by methods PUT/PATCH and DELETE via

<?php<br>
$data =  file_get_contents('php://input'), <br>

everything is fine, but kohana returns "emptiness" in the same way file_get_contents('php://input')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tytar, 2013-08-08
@tytar

The decision was prompted by krasulya, for which many thanks to him!
You can get the transferred data using the PUT/PATCH/DELETE methods in kohana 3 using ->body():

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question