-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to catch data from the post request #547
Comments
You didn't specify how the data is received but you can intercept any request using the event |
Data is coming by xhr request.
|
This issue has been automatically marked as stale because there has been no recent activity. It will be closed after 30 days if no further activity occurs. Thank you for your contributions. |
@cpamaster that would only catch XHR's. $page->getSession()->on('method:Network.requestIntercepted', function (array $params) use($page): void {
// here you will get all info about the request :)
var_dump($params);
//
$page->getSession()->sendMessage(
new \HeadlessChromium\Communication\Message('Network.continueInterceptedRequest', [
'interceptionId' => $params["interceptionId"]
])
);
});
// Intercept all requests
$page->getSession()->sendMessage(
new \HeadlessChromium\Communication\Message('Network.setRequestInterception', [
'patterns' => [['urlPattern' => '*']]
])
); |
Hello. One page make a post request and receive json data. How to get this data by chrome-php?
The text was updated successfully, but these errors were encountered: