Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
131 views

httpResource got released as an experimental feature in Angular 19.2. The httpResource uses the HttpClient under the hood. So I was hoping, I would be able to pass all the options I could pass to the ...
T. Jami's user avatar
  • 1,147
1 vote
1 answer
53 views

Imagine the situation where you provide any lib to client. Simple scenario, spinner interceptor which needs spinner service. In old way it was possible to: providers: [ { provide: ...
turtle's user avatar
  • 41
1 vote
1 answer
79 views

I have a weird behavior with my requests. If the request throw an error, I automatically get a second one launched Here is an example of my request : this.http.post(environment['url'] + '/ws/verifier/...
Nathan30's user avatar
  • 1,093
0 votes
0 answers
66 views

I have an interceptor for refreshing an access token, when it doesn't refresh, everything's all good, but when it does, the unfortunate request that happened to pass through it when it decided to ...
Symtax's user avatar
  • 25
1 vote
1 answer
46 views

there is an issue. I have Angular 17 app. There is a need to get a user data by http request as to keep it in localStorage and use everywhere. The request should be send once only and as earlier as ...
Alex Marat's user avatar
0 votes
1 answer
101 views

I am trying to implement the the refresh jwt token mechanism in an interceptor. I am following the accepted answer way in this post Angular - Waiting for refresh token function to finish before ...
Pawan Nogariya's user avatar
1 vote
1 answer
226 views

This is a simplified version of my Angular 18 error interceptor. It will retry requests that produced an error to make sure it was not a fluke (please don't ask!). This works, however I am running ...
Chris Barr's user avatar
  • 34.6k
0 votes
1 answer
42 views

Good morning everyone, I would need your help to retrieve the query or mutation name within the interceptor which is working fine. import { HttpContextToken, HttpInterceptorFn } from '@angular/common/...
DanyBoy's user avatar
  • 21
2 votes
1 answer
111 views

I am implementing a loading spinner that runs for all my http requests via an HttpInterceptorFn using this blog post as a guide: https://blog.angular-university.io/angular-loading-indicator/ loading....
Asad Koths's user avatar
1 vote
2 answers
71 views

I have created an interceptor to ensure that every request sends HttpOnly JWT/refresh tokens. I am attempting to refresh my short-lived JWT by catching a 401 error and asking the server for a refresh. ...
Asad Koths's user avatar
1 vote
0 answers
200 views

I'm working on an Angular 17 application where I'm trying to add an Authorization Bearer token to the request headers upon login. However, I'm facing an issue where the HttpInterceptor retrieves null ...
Kenbrnbe's user avatar
1 vote
1 answer
159 views

I believe with standalone component and HttpInterceptor has a bug! export const appConfig: ApplicationConfig = { providers: [ // provideHttpClient(withInterceptorsFromDi()), // { provide: ...
Tonyfilho's user avatar
0 votes
2 answers
65 views

I use this function to login: login() { this.authService.login(this.ngForm.value).subscribe({ next: (response) => { const loginData = response; this.user = loginData.user; this....
quma's user avatar
  • 5,787
1 vote
5 answers
7k views

I'm setting up a JWT interceptor in Angular 18.. I had this set up in Angular 8, although that was a completely different setup using a class which inherits HttpInterceptor. here I am using function ...
Jessie Lulham's user avatar
1 vote
2 answers
1k views

I have an interceptor that adds the access token to every request. The only problem is, the only way I can get this access token is by using a function that returns a Promise: async getToken(): ...
6godddd's user avatar
  • 35
2 votes
1 answer
642 views

I have been trying to create a loading spinner in my Angular application. I found an interesting tutorial here. It was all going pretty well, until the final step, when I need to actually create the ...
nbofni's user avatar
  • 47
0 votes
1 answer
399 views

In my app I created by using Angular 17 I have a very simple interceptor: import { HttpInterceptorFn } from '@angular/common/http'; import { HttpBodyModel } from "../models/http-body.model"; ...
Archimede's user avatar
  • 737
1 vote
1 answer
918 views

how do I inject an interceptor to an application generated as a modular app in angular 17? I mean the one generated with the --standalone argument? I tried injecting it as [provideHttpClient(...
Milton Isaya's user avatar
1 vote
1 answer
173 views

I'm receiving some multipart/mixed content from a server that contains some JSON as well as bytes and need to parse it into an object in Angular. This is how I send out my request: public sendRequest(...
TigersEye120's user avatar
0 votes
1 answer
157 views

I'm facing an issue with ngx-translate while integrating it with an interceptor in my Ionic Capacitor application. When attempting to access the translate service within the interceptor, I facing the ...
Sierra's user avatar
  • 69
0 votes
1 answer
848 views

I'm currently working on implementing a refresh token mechanism in my Angular frontend. When my backend returns a 401 error, my error interceptor handles it. However, I'm facing an issue: when my ...
AntoBoy's user avatar
  • 76
3 votes
2 answers
5k views

I was using the following class-based interceptor to refresh user token: @Injectable() export class AuthInterceptor implements HttpInterceptor { constructor(private inject: Injector) {} ...
Alex Wright's user avatar
0 votes
0 answers
42 views

Interceptor event always throws error and error block geting exicuting. We are upgrading our existing angular10 application to Angular 15. After upgradation we are facing issue whicle login to ...
davidArchA's user avatar
1 vote
2 answers
1k views

I have defined an http interceptor. Inside the interceptor I have the following code: let newReq = req.clone({ withCredentials: true, responseType: 'json' }); Now I need to modify all requests ...
Manos Kounelakis's user avatar
0 votes
0 answers
126 views

All of the examples that I'm following (https://github.com/bartosz-io/jwt-auth-angular), do not have a subscribe in the code, but it is the only way I can get my interceptor function to work. Notice ...
bradrice's user avatar
  • 1,817

1
2 3 4 5
18