mardi 27 octobre 2015

How to get curl POST data?

I'm trying to POST data using command line using curl.

curl -v POST -d ' { "data1": "sample1", "data2": "sample2" } ' -H "Content-Type: application/json" -H "Authorization: BASIC vkslnkg561mZEqCq3l3RglAOAZ7d8XBeg2VjIAyC" http://localhost/Bowling/public/api/foo

I'm using Laravel 5, is there any way to get the Authorization token and the data passed in routes/controller?

Right now Im using

getallheaders();

I'm able to get Authorization token but not the data { "data1": "sample1", "data2": "sample2" }



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1PTt6eR
via IFTTT

Aucun commentaire:

Enregistrer un commentaire