I've been troubleshooting an issue and I'm not sure if it's related to my local configuration or this library.
Currently, I am utilizing Angular.js to send requests to a REST server with Chatwork/slim-json-request middleware. Below are the request headers:
Accept:application/json, text/plain, /
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:2019
Content-Type:multipart/form-data; boundary=----WebKitFormBoundary5q7WNrrXPm77DsQv
Host:test.localhost
Origin:http://localhost:9002
Referer:http://localhost:9002/Register
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36
When trying to print out the values in the function call:
$app->request->getMediaType()
returns 'multipart/form-data'
However, $app->request->getBody()
is returning empty, even though it should contain key-value pairs sent via form submit (POST).
Additionally,
$app->request->post('param')
is returning the value passed by the request.
I am integrating Angular.js with Slim and Chatwork/slim-json-request available from here.
Any assistance would be greatly appreciated.