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

feat(common): support URL object in HttpClient #46470

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

crisbeto
Copy link
Member

Adds support for the URL object in HttpClient and HttpClientTestingBackend.

BREAKING CHANGE:
Implementations of HttpTestingController have to support the URL object as well.

Fixes #45497.

Adds support for the `URL` object in `HttpClient` and `HttpClientTestingBackend`.

BREAKING CHANGE:
Implementations of `HttpTestingController` have to support the `URL` object as well.

Fixes angular#45497.
@@ -30,7 +30,8 @@ export abstract class HttpTestingController {
/**
* Search for requests that match the given parameter, without any expectations.
*/
abstract match(match: string|RequestMatch|((req: HttpRequest<any>) => boolean)): TestRequest[];
abstract match(match: string|URL|RequestMatch|
Copy link
Member Author

Choose a reason for hiding this comment

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

I was on the fence on whether these changes are breaking since I've never seen anybody implement this class themselves. I played it safe since the class is marked as @publicApi.

@crisbeto crisbeto marked this pull request as ready for review June 23, 2022 07:55
@pullapprove pullapprove bot requested a review from alxhub June 23, 2022 07:55
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release labels Jun 23, 2022
@dylhunn dylhunn added the area: common/http Issues related to HTTP and HTTP Client label Jun 27, 2022
@ngbot ngbot bot added this to the Backlog milestone Jun 27, 2022
@josephperrott josephperrott added detected: breaking change PR contains a commit with a breaking change and removed flag: breaking change labels Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: review The PR is still awaiting reviews from at least one requested reviewer area: common/http Issues related to HTTP and HTTP Client detected: breaking change PR contains a commit with a breaking change target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support URL type in http client method
3 participants