Skip to content

Kirby 5.1.2

new Body()

Creates a new request body object. You can pass your own array or string. If null is being passed, the class will fetch the body either from the $_POST global or from php://input.

new Body(array|string|null $contents = null)

Parameters

Name Type Default Description
$contents arrayorstringornull null The raw body content

Parent class

Kirby\Http\Request\Body