Skip to content
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

Capture response headers by default #3

Open
AnrDaemon opened this issue Jun 19, 2020 · 1 comment
Open

Capture response headers by default #3

AnrDaemon opened this issue Jun 19, 2020 · 1 comment
Assignees

Comments

@AnrDaemon
Copy link
Owner

AnrDaemon commented Jun 19, 2020

Install default internal CURLOPT_HEADERFUNCTION handler.
Override setting of CURLOPT_HEADERFUNCTION option.
Integrate external callback into internal handler.

class Browser {
public function writeHeader($curl, $header) {
  $this->header .= $header;
  // Return count from external handler to fail in case of its failure
  return call_user_func($this->handler, null, $header); 
}
@AnrDaemon AnrDaemon self-assigned this Sep 9, 2020
@AnrDaemon
Copy link
Owner Author

Almost done in dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant