-
Notifications
You must be signed in to change notification settings - Fork 26.6k
feat(http): Add reponseType property to HttpResponse and HttpErrorRes… #63043
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
Conversation
Question : I still have doubts about the name of the property, although |
006ccfd
to
5c7b86d
Compare
…ponse Add support for the Fetch API's responseType property in HttpResponse and HttpErrorResponse when using HttpClient with the withFetch provider.
5c7b86d
to
0121b56
Compare
@mmalerba Is there anything else missing for this Pull Request to be approved or any observations? |
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.
Sorry, I was on vacation for a bit and it fell off my radar. LGTM
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.
reviewed-for: public-api
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.
reviewed-for: public-api
This PR was merged into the repository. The changes were merged into the following branches:
|
HttpResponse
responseType
Property SupportThis commit adds support for the Fetch API's
responseType
property in HttpResponse and HttpErrorResponse when using HttpClient with the withFetch provider.This change enhances HttpClient's alignment with the native Fetch API by exposing the response type information that indicates how the browser handled the response based on CORS policies and request mode. This provides developers with valuable insights into the nature of the response they received.
The Change Includes:
responseType
property toHttpResponse
andHttpErrorResponse
classesMotivation / Use Cases
The
responseType
property provides crucial information about how the browser handled the response based on CORS policies and request configuration:Examples of New Usage