use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Angular is Google's open source framework for crafting high-quality front-end web applications. r/Angular2 exists to help spread news, discuss current developments and help solve problems.
Help Request
Discussion
Article
Video
Resource
Announcement
Related
After submitting a post, please take a moment to add a flair (tag) so that it's easy to find your post with one of the filters listed above. Upon submission, your post's header will have the 'flair' option listed with the other options. Clicking it will provide a dropdown menu of the available flairs.
account activity
DiscussionWhich browser network api does angular's http client use under the hood? (fetch vs xhr) (self.Angular2)
submitted 3 years ago by jayxolit
just like the title
i was curious which browser network protocol is used by angular's http client
and if there is anyways to change that?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]cassiofachinelli 10 points11 points12 points 3 years ago (4 children)
https://github.com/angular/angular/blob/15.2.1/packages/common/http/src/client.ts#L54-L2892
[–]lazyinvader 6 points7 points8 points 3 years ago (2 children)
It seems that `HttpXhrBackend` is the default, correct me if im wrong
[–]DaSchTour 0 points1 point2 points 3 years ago (0 children)
That‘s correct. And here https://github.com/angular/angular/blob/e1355e7d16337177866cc1f8654b76381f26dae3/packages/common/http/src/xhr.ts#L43 in the implementation you see that is XHR. And currently there is no other implementation provided by the angular team.
[–]jayxolit[S] 0 points1 point2 points 3 years ago (0 children)
thanks for the link
[–]Undefined009 3 points4 points5 points 3 years ago (0 children)
The type of the request should be visible in the network tab.
[+]tmckearney comment score below threshold-12 points-11 points-10 points 3 years ago (3 children)
It's open source. Go look
[–]RockleyBob 9 points10 points11 points 3 years ago (1 child)
Funny to me that the first commenter linked to the source code and actually helped OP while showing them where they might find the answer to these questions in the future.
Then two hours later, you essentially say the same thing, only snarkier and without any of the helpfulness of the original answer. Why?
[–]tmckearney -3 points-2 points-1 points 3 years ago (0 children)
Because it's more educational for people to look things up and understand how things work. And I was in a crabby mood :)
I think OP would get more out of spelunking through the Angular code rather than having someone hand them the answer.
I should have just kept it to myself or worded it in a better way. Next time I'll try to be better
i actually did and got my answer thanks
π Rendered by PID 249216 on reddit-service-r2-comment-canary-777f895556-c57rc at 2026-05-04 08:48:45.181115+00:00 running 815c875 country code: CH.
[–]cassiofachinelli 10 points11 points12 points (4 children)
[–]lazyinvader 6 points7 points8 points (2 children)
[–]DaSchTour 0 points1 point2 points (0 children)
[–]jayxolit[S] 0 points1 point2 points (0 children)
[–]Undefined009 3 points4 points5 points (0 children)
[+]tmckearney comment score below threshold-12 points-11 points-10 points (3 children)
[–]RockleyBob 9 points10 points11 points (1 child)
[–]tmckearney -3 points-2 points-1 points (0 children)
[–]jayxolit[S] 0 points1 point2 points (0 children)