Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[HttpClient] doc how to cancel a request + upload files#11668
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedJun 5, 2019
When merging this into 4.4, don't miss removing the changes done in#11663 |
This PR was merged into the 4.3 branch.Discussion----------[HttpClient] add $response->cancel()| Q | A| ------------- | ---| Branch? | 4.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR |symfony/symfony-docs#11668An alternative to#31845 and#31842.Same as#31831 but considered as a bug fix (at the Contracts level), thus for 4.3.I think we're early enough since 4.3/1.1 to do it.That will save us some headaches in the short term.Commits-------c402418 [HttpClient] add $response->cancel()
This PR was merged into the 4.3 branch.Discussion----------[HttpClient] add $response->cancel()| Q | A| ------------- | ---| Branch? | 4.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR |symfony/symfony-docs#11668An alternative to #31845 and #31842.Same as #31831 but considered as a bug fix (at the Contracts level), thus for 4.3.I think we're early enough since 4.3/1.1 to do it.That will save us some headaches in the short term.Commits-------c402418723 [HttpClient] add $response->cancel()
This PR was merged into the 4.3 branch.Discussion----------[HttpClient] add $response->cancel()| Q | A| ------------- | ---| Branch? | 4.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR |symfony/symfony-docs#11668An alternative to #31845 and #31842.Same as #31831 but considered as a bug fix (at the Contracts level), thus for 4.3.I think we're early enough since 4.3/1.1 to do it.That will save us some headaches in the short term.Commits-------c402418723 [HttpClient] add $response->cancel()
This PR was merged into the 4.3 branch.Discussion----------[HttpClient] add $response->cancel()| Q | A| ------------- | ---| Branch? | 4.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR |symfony/symfony-docs#11668An alternative to #31845 and #31842.Same as #31831 but considered as a bug fix (at the Contracts level), thus for 4.3.I think we're early enough since 4.3/1.1 to do it.That will save us some headaches in the short term.Commits-------c402418723 [HttpClient] add $response->cancel()
nicolas-grekas commentedJun 7, 2019
This can merged now :) |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
d7c3a94 tod29eb7eComparecomponents/http_client.rst Outdated
| }, | ||
| ]); | ||
| The exception will be wrapped in an instance of ``TransportExceptionInterface`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Unfortunately the symfony cloud endpoint for this PR is not bootstrapped yet :(
This belongs to the* throw an exception from a progress callback::-Part, but I am not sure if it will be rendered correct with this indention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yes, while merging we can reword this to remove the<ul> list and turn it into paragraphs:
To abort a request (e.g. because it didn't complete in due time, or you want tofetch only the first bytes of the response, etc.), you can either use the ``cancel()`` method of ``ResponseInterface``: ...Or throw an exception from a progress callback:: ...The exception will be wrapped in an instance of ``TransportExceptionInterface``and will abort the request.
OskarStark left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you Nicolas 👍
javiereguiluz left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Very nice! Thanks Nicolas.
components/http_client.rst Outdated
| This means there is usually nothing to configure to have the client work with | ||
| proxies, provided these env vars are properly configured. | ||
| You can still set or override these settings using the `proxy`` and ``no_proxy`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There's a missing opening backtick inproxy:
`proxy`` -> ``proxy``Uh oh!
There was an error while loading.Please reload this page.
components/http_client.rst Outdated
| }, | ||
| ]); | ||
| The exception will be wrapped in an instance of ``TransportExceptionInterface`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yes, while merging we can reword this to remove the<ul> list and turn it into paragraphs:
To abort a request (e.g. because it didn't complete in due time, or you want tofetch only the first bytes of the response, etc.), you can either use the ``cancel()`` method of ``ResponseInterface``: ...Or throw an exception from a progress callback:: ...The exception will be wrapped in an instance of ``TransportExceptionInterface``and will abort the request.Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedJun 9, 2019
Comments addressed, thank you all! |
javiereguiluz commentedJun 11, 2019
Thank you Nicolas. |
…(nicolas-grekas)This PR was merged into the 4.3 branch.Discussion----------[HttpClient] doc how to cancel a request + upload filesFixes#11658. Needssymfony/symfony#31850Commits-------b096999 [HttpClient] doc how to cancel a request + upload files
This PR was merged into the 4.3 branch.Discussion----------[HttpClient] add $response->cancel()| Q | A| ------------- | ---| Branch? | 4.3| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR |symfony/symfony-docs#11668An alternative to #31845 and #31842.Same as #31831 but considered as a bug fix (at the Contracts level), thus for 4.3.I think we're early enough since 4.3/1.1 to do it.That will save us some headaches in the short term.Commits-------c402418723 [HttpClient] add $response->cancel()
Uh oh!
There was an error while loading.Please reload this page.
Fixes#11658. Needssymfony/symfony#31850