Codeception / Codeception/module-rest

How to send raw data with method sendPost?

Ouverte
#110 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
PHP
Étoiles
60
Forks
30
Merge moyen
22 h 37 min
PR mergées (30 j)
1

Description

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

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

Result:

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

How can this be done?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.