Codeception / Codeception/module-rest

How to send raw data with method sendPost?

オープン
#110 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
PHP
スター
60
フォーク
30
平均マージ
22時間 37分
マージ済み PR(30日)
1

説明

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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。