Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
2 votes
2 answers
778 views

Checking the timeout error on the port with Angular 2 and rjxs

I want to check if the request is timeout when I send a request to the port. I just want to print an error when the request is timeout. myService.service.ts checkStatus() : Observable<any> { ...
Alisha's user avatar
  • 31
2 votes
1 answer
3k views

How to make multiple API calls using ConcatMap with conditions

In Angular 7, I am trying to invoke two different API methods sequentially. If first one is successful then need to call second API method. If first API response code is 500 internal server error then ...
Tech Learner's user avatar
  • 1,297
0 votes
1 answer
3k views

Angular error handling during multiple API calls

In My Angular application, I have to call two API methods sequentially. If first API call returns 200 OK or Success then need to invoke second API method. If first call is not successful then need to ...
Tech Learner's user avatar
  • 1,297
0 votes
1 answer
124 views

Need to call logout call on browser close - In angular

Below is my logout call: logoutClick() { let response: any; this._httpService.fetch(SERVICE_URL.LOGOUT, 'get').subscribe( (res: any) => { response = res; }, ...
Rashmi Thakkar's user avatar
0 votes
1 answer
1k views

How to cancel API calls that take more than 10 ms to respond in interceptor

I have tried to implement this using takeUntil rxjs, It will not cancel all API calls after a certain time when I click on the Call API button multiple times. Stackblitz link - Code Example Question 1 ...
Bhavin's user avatar
  • 199
2 votes
1 answer
2k views

How to use exhaustMap correctly Angular 7

The grid is bound to the service using async. Using the same service for more than one cases (modes - the state changes then) I found out that sometimes the second request finishes first and the fist ...
Giannis's user avatar
  • 1,840
0 votes
1 answer
79 views

In angular7, how to get combined response from 2 different dependent http call. first http call returns an array of object and other its related data

My first api returns following data { "resp": [ { "id": "932e", "name": "jon" }, { "id": ... "name": ...
ajay_full_stack's user avatar
2 votes
1 answer
2k views

How to use exhaustMap correctly - How to wait for a service call return before sending another request

I use a button to initialiseGrid(). Without disabling the button while the call is ongoing, I'd like to either wait the 1st response returns and then trigger the 2nd request or (even if triggering ...
Giannis's user avatar
  • 1,840
0 votes
1 answer
48 views

Nest httpClient calls and tell which one failed?

I have a component somewhat like the pseudo-code snippet at the bottom. I need to amend onDeployForTesting() so that it calls myService.save() before calling myService.deployForTesting(). I have been ...
atwright147's user avatar
  • 3,750
0 votes
3 answers
265 views

Conditionals and assignments before switchmap in Angular7

I'm still trying to get my head around rxjs in Angular, I still don't fully understand pipes and operators. I need help with this scenario and what would be the correct way to do it (allready tried a ...
Guillermo Bascuñana's user avatar
1 vote
1 answer
142 views

need help on angular 7 Observable async pipe

Im trying to achieve page source wait from API call public responseTop: Observable<any>; this.responseTop = this.productSRV.topEquipments(); this.responseTop.toPromise().then(sucess ...
Shafqat Jan's user avatar
2 votes
3 answers
8k views

Mapping http response to typeScript object

I am trying to convert API response (json string array) to typescript object but not able to achieve . I tried to add map function but not able to use it properly. Sample API response is ["Paris","...
Bumble's user avatar
  • 557
1 vote
1 answer
435 views

Trying to subscribe to a behavior subject in my user profile component but I keep getting initial null value

I have a user profile component that is trying to subscribe to a behavior subject in my user service. I set the initial value of the behavior subject to null. When a user signs up, I pass values to my ...
eye4eneye's user avatar
0 votes
2 answers
29 views

Send httpclient post inside another httpclient post in Angular7

I have two problems, the first one is that I want to send data to server with httpclient post method, and if everything is ok I want to send the other post request. I have the first table (codeRole, ...
Hazem HASAN's user avatar
  • 1,648
0 votes
1 answer
319 views

Choose right RxJs operator in Angular 7 http interceptor

I'm new to RxJs and I'd appreciate if you could advise which operator I can use in my interceptor. I need to perform async request to refresh authentication token if the session is to end soon: ...
Gyuzal's user avatar
  • 1,591

15 30 50 per page
1
2 3 4 5
11