I am trying to execute POST data using the 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 am using Laravel 5, is there any way to get the authorization token and the data transferred in the routes / controller?
I'm using now
getallheaders();
I can get the authorization token, but not the data {"data1": "sample1", "data2": "sample2"}
source
share