Skip to content

[BUG] POST request body is lost #421

Description

@ahmadsrpc

Describe the bug
When sending a POST/PUT/PATCH request through the UI, the request body is always empty on the Laravel side.

To Reproduce:

Open any POST endpoint in the UI
Fill in the request body
Click Send
On the Laravel side, $request->all() returns []
Check the Network tab in DevTools — you will see a 301 redirect followed by a GET request

Debugging evidence:
Added a debug route:
Route::post('/debug-request', function (\Illuminate\Http\Request $request) {
return response()->json([
'content_type' => $request->headers->get('Content-Type'),
'is_json' => $request->isJson(),
'all' => $request->all(),
'raw_content' => $request->getContent(),
]);
});
Result from the UI:
{
"content_type": "application/json",
"is_json": true,
"all": [],
"raw_content": "{}"
}
The same request sent via curl works perfectly and returns the correct body.

Environment:

Laravel 12
PHP 8.x
rakutentech/laravel-request-docs v2.43

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions