angular2-http Questions

3

Solved

I have a requirement to pull a few resources from another domain held by my company. I want to pull secured HTML content with GET requests. When a user is signed out of the application the request...
Barfield asked 27/4, 2016 at 9:22

12

Do you need to unsubscribe from Angular 2 http calls to prevent memory leak? fetchFilm(index) { var sub = this._http.get(`http://example.com`) .map(result => result.json()) .map(json => ...
Gerlach asked 27/1, 2016 at 16:33

4

Solved

I'm am trying to use withCredentials to send a cookie along to my service but can't find out how to implement it. The docs say "If the server requires user credentials, we'll enable them in the req...
Credulity asked 27/7, 2016 at 14:2

5

Solved

I'm new in angular2 and typescript and already spent a half day to figure out with ng2 forms. I have finished all my routes and builded all necessary form and currently trying to understand how to ...
Fenner asked 4/10, 2016 at 21:24

14

Solved

I am trying to work through the Angular2 tour of heroes app, and am running into bugs on the Http section of the tutorial. At first I was getting the error: Cannot find module 'angular2-in-memor...
Glaring asked 5/10, 2016 at 14:51

3

Solved

Thus there are many ad hoc libraries supporting upload/download progress in angular2, I do not know how to use native angular2 http api to show progress while doing upload/download. The reason why ...
Hokanson asked 14/2, 2017 at 16:19

7

Solved

I have an Ionic 2 application using Angular 2, which is sending an Http PUT to a ASP.NET Core API server. Here's the method I'm using to send the request: public update(student: Student): Promise&...
Rebroadcast asked 14/12, 2016 at 2:11

3

Solved

I have a method handleError() like in the documentation https://angular.io/docs/ts/latest/guide/server-communication.html#!#error-handling private handleError(error: any) { console.error(error); ...
Alfons asked 23/6, 2016 at 10:17

8

Solved

Im following this tutorial. On the way to get list of users from api.github Im getting error: Cannot find a differ supporting object '[object Object]' I think its related to <ul> &l...
Overweening asked 26/2, 2016 at 19:42

9

Solved

Actually, I'm working on a Spring REST API with an interface coded in Angular 2. My problem is I can't upload a file with Angular 2. My Webresources in java is that : @RequestMapping(method = R...
Barrier asked 1/4, 2016 at 9:15

14

Solved

I know this is very a general question but I am failing to upload a file in Angular 2. I have tried 1) http://valor-software.com/ng2-file-upload/ and 2) http://ng2-uploader.com/home ...but f...
Excite asked 24/10, 2016 at 9:18

3

I am developing a front end which consumes JSON services provided by a server. I happily use HTTP of Angular2 and I can catch errors via .catch() operator. If I find a problem related to a speci...
Dessau asked 24/2, 2016 at 12:8

2

Solved

My angular 4.3.2 code is calling my back-end service that takes 2-4 minutes to return. Using just the default this.http.get code, I see that the default timeout kicks in after 2 minutes. Howe...
Kolnos asked 14/1, 2019 at 17:23

2

Solved

I am using observable in service getMembers(): Observable<any[]> { return this._http.get('http://localhost/membership/main/getUsers') .map(response => response.json() ); } component memb...
Lakieshalakin asked 5/10, 2017 at 8:18

5

Solved

I have a REST endpoint that returns a list of items, max 1000 items at a time. If there are more than 1000 items, the response has HTTP status 206 and there's a Next-Range header that I can use i...
Besmirch asked 10/11, 2016 at 13:50

5

Solved

Which one is best to build a mock web service just for test purposes in Angular apps?
Lalonde asked 16/7, 2017 at 14:40

7

Solved

I have an AuthGuard (used for routing) that implements CanActivate. canActivate() { return this.loginService.isLoggedIn(); } My problem is, that the CanActivate-result depends on a http-get-res...
Laurentia asked 21/6, 2016 at 15:4

13

Solved

I've been playing with Angular 2 Quickstart. How can I use/import http module in Angular 2? I've looked at Angular 2 Todo's.js, but it doesn't use the http module. I've added "ngHttp": "angular/...
Octaviooctavius asked 7/3, 2015 at 2:53

3

Solved

I'm playing around with Angular2, and was hoping someone could offer some advice on how to achieve this; For example, if my model currently looks like this for an employee: export class Employee ...
Mitchmitchael asked 16/11, 2016 at 13:42

4

To know if a request has completed, I do if (httpEvent instanceof HttpResponse). Likewise, how to know if a request is cancelled in HttpInterceptor? Below is my intercept function. intercept(httpR...
Urolith asked 10/11, 2017 at 8:6

8

Solved

I understand using observable I can execute a method when the request is completed, but how can i wait till a http get is completed and return the response using in ng2 http? getAllUser(): Array&l...
Comeau asked 23/10, 2015 at 5:4

9

I am trying to set base url for all my angular 2 http requests. Following is the basic set up for my application. class HttpOptions extends BaseRequestOptions { url:string = "http://10.7.18.21:80...
Stereotropism asked 29/12, 2015 at 18:16

5

How to configure and make a https request from angular 2? Couldn't find any resources on it. Can please someone guide me here? Thank you.
Bradski asked 27/9, 2016 at 0:45

3

Solved

I realize my title is a bit vague, but here is my situation. I have just started an application in which I am implementing JWT for authentication. I have my server side set up, and can verify it is...
Dolora asked 30/12, 2016 at 23:54

3

Solved

When I make a post request the angular 2 http is not sending this request this.http.post(this.adminUsersControllerRoute, JSON.stringify(user), this.getRequestOptions()) the http post is not sent...
Suppose asked 24/3, 2016 at 19:41

© 2022 - 2025 — McMap. All rights reserved.