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

Angular.dev tutorial uses fetch for HTTP requests, but this doesn't seem to work well with Interceptors #53911

Closed
pythonweb2 opened this issue Jan 14, 2024 · 1 comment
Labels
area: common/http area: docs Related to the documentation P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: has PR
Milestone

Comments

@pythonweb2
Copy link

Describe the problem that you experienced

In the new tutorial for Angular 17 on https://angular.dev/, the Build your first Angular app tutorial uses the fetch api in the Add HTTP Communication section. However, as I am looking into building things like interceptors into my app, they don't seem to play well with the fetch API.

Could a note be added about the downsides of using the fetch API? Or, if I am missing something about interceptors (and other features that are included with the HttpClient) can notes be added to the tutorial about how to use these features?

Enter the URL of the topic with the problem

https://angular.dev/tutorials/first-app/http

Describe what you were looking for in the documentation

More insight on the pros/cons of the fetch api vs HttpClient

Describe the actions that led you to experience the problem

Following the tutorial

Describe what you want to experience that would fix the problem

Better documentation

Add a screenshot if that helps illustrate the problem

No response

If this problem caused an exception or error, please paste it here

No response

If the problem is browser-specific, please specify the device, OS, browser, and version

No response

Provide any additional information here in as much as detail as you can

No response

@JeanMeche JeanMeche added the needs reproduction This issue needs a reproduction in order for the team to investigate further label Jan 14, 2024
@JoostK
Copy link
Member

JoostK commented Jan 14, 2024

The docs suggest using native fetch, not the fetch backend for HttpClient. I think it's a fair point to have more info on the distinction.

And indeed, interceptors are specific to using HttpClient.

@JoostK JoostK added area: common/http area: docs Related to the documentation and removed needs reproduction This issue needs a reproduction in order for the team to investigate further labels Jan 14, 2024
@ngbot ngbot bot added this to the needsTriage milestone Jan 14, 2024
@bencodezen bencodezen added area: adev Angular.dev documentation P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Jan 18, 2024
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jan 18, 2024
JeanMeche added a commit to JeanMeche/angular that referenced this issue Apr 25, 2024
@JeanMeche JeanMeche added state: has PR and removed area: adev Angular.dev documentation labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: common/http area: docs Related to the documentation P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: has PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants