Skip to content

Empty Request Body  #2

@j0hnw0rk3r

Description

@j0hnw0rk3r

Hi,

I was trying to figure out how to fix this issue - I'm not sure if it is related to my local config or on this library.

I use Angular.js to send request to REST server. Here 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:16571
Content-Type:multipart/form-data; boundary=----WebKitFormBoundary3lvkDgdYpvoj8YIb
Host:testing.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

Now, in the function call, when I try to print out the values:
$app->request->getMediaType() returns 'multipart/form-data' (should be application/json)
$app->request->getBody() returns empty

but when I try:
$app->request->post('email') returns 'myemail@example.com'

Now I'm beginning to lose my mind because when I tried on my production server it went successfully.

Please help. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions