Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Closes issue #55 #155

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,28 @@ printf('Dimensions: %s', print_r($dimensions, true));
$browser->close();
```

**Example** - send post request:

```php
$puppeteer = new Puppeteer();
$browser = $puppeteer->launch();
$page = $browser->newPage();

$page->setRequestInterception(true);
$page->on('request', new JsFunction(
['interceptedRequest'],
"
var data = {
'method': 'POST',
'postData': '" . http_build_query($options['form_params']) . "'
};
interceptedRequest.continue(data);
"
));

$response = $page->goto('https://example.com');
```

## Requirements and installation

This package requires PHP >= 7.3 and Node >= 8.
Expand Down