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

Add new request() and requestStreaming() methods and deprecate send() method and streaming option #170

Merged
merged 2 commits into from
Jun 28, 2020

Conversation

clue
Copy link
Owner

@clue clue commented Jun 27, 2020

This changeset introduces two new methods, request() and requestStreaming().

The request() method can be used to send arbitrary HTTP requests and deprecates the send() method:

// old: deprecated
$browser->send(new Request('OPTIONS', $url));

// new
$browser->request('OPTIONS', $url);

The requestStreaming() method can be used to send an arbitrary HTTP request and receive a streaming response without buffering the response body:

// old: deprecated
$browser->withOptions(['streaming' => true])->get($url);

// new
$browser->requestStreaming('GET', $url);

Refs #154 and #56 and others.
Builds on top of #162, #167 and #168

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

Successfully merging this pull request may close these issues.

1 participant