Thanks to visit codestin.com
Credit goes to github.com

Skip to content

How to send raw data with method sendPost? #110

Open
@s1lver

Description

@s1lver

I want to send POST request with headers and raw data (string not array)

Test:

$I->haveHttpHeader('HeaderName', 'HeaderValue');
$I->sendPost(url: '/localhost', params: 'my raw content'); // @param array|string|JsonSerializable $params

Result:

var_dump(file_get_contents('php://input')); // string(0) ""
var_dump($_POST); // array(0) {}

How can this be done?

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