Questions tagged http

Explore the latest questions and answers asked by our top developers.

angular child rendering before parent data is received

I have a parent component (app.component) making an http request, assigning the result as this.stats then passing it as a prop to the child (progression.component). my issue seems to be that my child is rendering before it gets any data from the parent causing the child to throw errors and break. i.e I’m getting -> […]

By luther wardle
Categorized as angular, http, prop Tagged , ,

making multiple http requests inside angular observable [duplicate]

I’m trying to use the http module in angular to make requests within my service.ts file on init of my app component…. my issue is that my function getStats() is an observable and it simply returns stats before making the second post request to my json server what I would like to do is make […]

By luther wardle
Categorized as angular, asynchronous, http, typescript Tagged , , ,

What is interceptor chain in Angular?

Could someone describe example of interceptor chain? There is some collocation in the Angular documentation about Interceptor: Most interceptors transform the outgoing request before passing it to the next interceptor in the chain, by calling next.handle(transformedReq). An interceptor may transform the response event stream as well, by applying additional RxJS operators on the stream returned […]

Footer on top on one page only

I have a problem only with one page of my node app. In every page the footer is at the bottom while when from the menu I choose the page in which the graph is present, this is shown under the footer. I also tried adding footer changes in css file but i didn’t get […]

By MaxyCar
Categorized as angularjs, css, d3.js, http, node.js Tagged , , , ,

display ‘The user name or password is incorrect.’ error in Login

so I want to console.log "The user name or password is incorrect." message when the user types the wrong credentials. My problem is that I don’t know how to do it exactly. Any suggestions? Here is my Error Interceptor : export class ErrorInterceptor implements HttpInterceptor { constructor(private authenticationService:AuthenticationService) {} intercept(request:HttpRequest<any>, next:HttpHandler) : Observable<HttpEvent<any>> { return […]

By just askin
Categorized as angular, http, typescript Tagged , ,

Nginx Reverse Proxy to Allow CORS for Jasper Reports Server running on Tomcat Failing Preflight Request Access Control Check

I have an Angular Web Application and I need it to communicate with a Jasper Reports Server REST API running on Apache Tomcat. The problem I’m currently having is to enable CORS. I have tried to enable CORS with the Tomcat Configuration but I have given up on that and am looking to create a […]

By Steven John Lally
Categorized as angular, http, nginx, tomcat Tagged , , ,

How to use header from interceptor in my app

I have added a responseWithHeader to my HTTP request in my backend. I can see this is working correctly as it is appearing in my Network tab of Developer Tools. I am using interceptor in Angular to handle HTTP Requests and Responses, but the issue I am having is as follows: I have added the […]

Need Angular 8 canActivate to return Observable<boolean> of a Subject

So I have an Angular 8 application that uses cookies to handle authentication (Laravel server using Laravel Sanctum). Because I am using cookies and I dont store any user data/tokens in localStorage, I have to fetch the current user from my server every time my app initializes using a stored cookie. auth.service.ts export class AuthService […]

By amcardwell
Categorized as angular, http, javascript, rxjs Tagged , , ,

How to properly cancel a HTTP request with Angular and PHP

Hi I currently have a http request like this in Angular: data = await’rca/obtener_equipos’, {subsistemas}) .pipe( takeUntil(this.ngUnsubscribe) ).toPromise(); then I have a while in my PHP server for this task: while (1) { Echo "n"; if (connection_status()!=0){ die; } But this didnt work, the server stuck until the task ends. pd: I checked with […]

By Cristofer Fuentes
Categorized as angular, http, php Tagged , ,

Duplicate request is always performed when the request throws an error

I have a weird problem. I have a service, which gets data from the Back-end and a function like this: validateChangEmailTokenAndChangeEmail(token: string): Observable<User> { const callUrl = environment.apiUrl + `users/validate-change-email-token-and-change-email`; return<User>(callUrl, token, environment.httpOptions) .pipe(shareReplay(), retry(0)); } My problem is that when I subscribe to this observable (which is subscribed only once when a component […]

By Renis1235
Categorized as angular, angular-httpclient, http Tagged , ,
1 33

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us