marcj / php-rest-service

Php-Rest-Service is a very simple and fast PHP class for server-side RESTful JSON APIs.
MIT License
216 stars 74 forks source link

Add parse php/input #14

Open ntvsx193 opened 10 years ago

ntvsx193 commented 10 years ago

https://github.com/marcj/php-rest-service/issues/13

marcj commented 10 years ago

I like the change, but it should actually be handled automatically depending on the request header's Content-Type. We should not depend then anymore on $_GET, $_POST directly, instead making a new method getValue($key) that checks the content-type and returns queryString value or this from the (encoded) request body should do the trick.

ntvsx193 commented 10 years ago

Oh, yes. You're right. I'm add check Content-type and upload commit.

fangstar commented 6 years ago

@ntvsx193 This PR is great! Thanks for sharing it. This needs to be merged. I've manually merged it in my project.

higimo commented 5 years ago

@marcj please accept pull request

yennor commented 5 years ago

works great!