Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
javiereguiluz merged 1 commit intosymfony:4.3fromnicolas-grekas:hc++
Jun 11, 2019

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedJun 4, 2019
edited by javiereguiluz
Loading

andreia reacted with heart emojiandreia reacted with rocket emoji
@nicolas-grekasnicolas-grekas changed the title[HttpClient] doc how to cancel a request[HttpClient] doc how to cancel a request + upload filesJun 5, 2019
nicolas-grekas referenced this pull requestJun 5, 2019
This PR was merged into the 4.4 branch.Discussion----------[HttpClient] Documented the cancel() methodFixes#11658.Commits-------a983ece [HttpClient] Documented the cancel() method
@nicolas-grekas
Copy link
MemberAuthor

When merging this into 4.4, don't miss removing the changes done in#11663

@javiereguiluzjaviereguiluz added HttpClient Waiting Code MergeDocs for features pending to be merged labelsJun 5, 2019
fabpot added a commit to symfony/symfony that referenced this pull requestJun 5, 2019
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()
symfony-splitter pushed a commit to symfony/http-client that referenced this pull requestJun 5, 2019
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()
symfony-splitter pushed a commit to symfony/contracts that referenced this pull requestJun 5, 2019
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()
symfony-splitter pushed a commit to symfony/http-client-contracts that referenced this pull requestJun 5, 2019
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
Copy link
MemberAuthor

This can merged now :)

@OskarStarkOskarStark removed the Waiting Code MergeDocs for features pending to be merged labelJun 7, 2019
@nicolas-grekasnicolas-grekasforce-pushed thehc++ branch 2 times, most recently fromd7c3a94 tod29eb7eCompareJune 7, 2019 06:32
},
]);

The exception will be wrapped in an instance of ``TransportExceptionInterface``
Copy link
Contributor

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

cc@javiereguiluz

Copy link
Member

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 reacted with thumbs up emoji
Copy link
Contributor

@OskarStarkOskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thank you Nicolas 👍

Copy link
Member

@javiereguiluzjaviereguiluz left a 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.

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``
Copy link
Member

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``

},
]);

The exception will be wrapped in an instance of ``TransportExceptionInterface``
Copy link
Member

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 reacted with thumbs up emoji
@nicolas-grekas
Copy link
MemberAuthor

Comments addressed, thank you all!

OskarStark reacted with thumbs up emoji

@javiereguiluz
Copy link
Member

Thank you Nicolas.

@javiereguiluzjaviereguiluz merged commitb096999 intosymfony:4.3Jun 11, 2019
javiereguiluz added a commit that referenced this pull requestJun 11, 2019
…(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
@nicolas-grekasnicolas-grekas deleted the hc++ branchJune 15, 2019 21:34
sadafrangian3 pushed a commit to sadafrangian3/Dependency-Injection-http-client that referenced this pull requestNov 2, 2022
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()
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

@OskarStarkOskarStarkOskarStark approved these changes

+1 more reviewer

@andreiaandreiaandreia requested changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

5 participants

@nicolas-grekas@javiereguiluz@andreia@OskarStark@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp