angular4-httpclient Questions
2
Solved
I want to better understand options to implement offline-friendly webapps and I read this article here: https://angular.io/guide/http which also talks about angular's interceptors.
Now I am a bit ...
Uribe asked 4/1, 2018 at 17:28
10
I am trying to consume an API URL. I am calling the API with the below code.
import {HttpClient, HttpClientModule, HttpParams} from "@angular/common/http";
@Injectable()
export class PropertyPref...
Julissajulita asked 1/2, 2018 at 7:25
3
Solved
I am using Angular 4 simple form,Getting error when i compile the project using command line,How to solve the warning.see Error Image 1: https://i.sstatic.net/N1AH4.png
> WARNING in Circular d...
Janiuszck asked 19/12, 2017 at 7:18
4
I have several services in my app that point to different API URLs. Now I need to set different headers to each of these services. My question is now regarding the new interceptors in Angular 4. Is...
Messinger asked 9/9, 2017 at 12:34
9
Solved
While trying to add a PrimeNG table I broke my build here: https://github.com/BillyCharter87/Tech-O-Dex-UI/tree/BrokeIt
I recall updating my package.json from TypeScript 2.3.4 to 2.4.0 and it brok...
Fao asked 25/4, 2018 at 2:58
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
4
Solved
Usually it's desirable to have default timeout (e.g. 30s) that will be applied to all requests and can be overridden for particular longer requests (e.g. 600s).
There's no good way to specify defa...
Ivar asked 29/8, 2017 at 12:15
3
Solved
I am trying to access a wep api with angular 4 post method.
In my service, I've added content-type of application/json. And I'm converting the object into json while sending data to api. I am usin...
Desolate asked 9/4, 2018 at 5:50
3
Solved
I started learning Angular 4 and got to the part with HTTP Client. Right now I'm trying to make an http call from the component (yes, I know I should transfer it to service, but still)
But for som...
Forde asked 30/10, 2017 at 10:39
1
I have a problem with HttpHeaders (angular 4.3.0) and Karma. I write some tests and when I run them with npm test command, the http queries are unauthorized because the token (X-Auth-Token) is not ...
Hackamore asked 26/9, 2017 at 15:41
2
Solved
I have an Angular 4 Project where I am creating a sample Map as follows:
let sampleMap = new Map<string, string>();
sampleMap.set('key1','value1');
Now I am passing this Map as a parameter...
Quintana asked 15/3, 2018 at 5:59
3
We've got a .net WebAPI which looks for a filepath string in the body of a post request and returns the corresponding image. I'm struggling to successfully pass a string to it from Angular 4.3 usin...
Quintile asked 17/11, 2017 at 16:8
3
API
add(data) {
return this.httpClient.post<any>('/api/v3/templates', data);
}
Observable
this.templateService.add(obj)
.subscribe(
(response) => {
console.log(reposne)
},
(error)...
Outvote asked 20/9, 2017 at 14:15
2
Solved
Using the new Angular 4.3 HttpClient, how can I upload and access files in an ASP.NET Core 2.0 Controller while reporting upload progress to the client?
Ponytail asked 13/9, 2017 at 20:51
1
Solved
I'm trying to fetch data from API using interface.
Bellow is my temp interface
export interface ITemp {
id: number,
name: string,
age: number
}
And below is my HTTP service, where there is a ...
Redtop asked 12/1, 2018 at 14:55
1
Solved
In this article here and others :It looks like you need to import HttpClientModule in app.module.ts and HttpClient in app.component.ts to make a http request. Why? How do they work?
Rochelrochell asked 6/1, 2018 at 4:3
2
Solved
I'm using HttpInterceptor api of Angular's HttpClientModule and now stuck with a situation. Here is my use-case.
In my application, if any service makes an http call, I want to make another silent...
Oocyte asked 15/12, 2017 at 14:41
1
Solved
I am using HTTP_INTERCEPTORS in angular4. For this, I have created HttpServiceInterceptor class that implements HttpInterceptor interface and provide the defintion for intercept method. Then regist...
Submiss asked 11/12, 2017 at 7:4
1
Solved
constructor(private http: HttpClient) {
}
ngOnInit() {
this.http.get('url').subscribe(data => {
console.log(data);
console.log(data.login);
});
}
}
Here, I can see the data with login ...
Frecklefaced asked 2/11, 2017 at 12:20
0
I'm using implicit grant flow in angular 4 where the recommended approach is to set windows.location.href to the auth provider url.
Can I create a promise from windows.location.href so I know to t...
Pius asked 23/9, 2017 at 2:26
1
Solved
I need to intercept request to the html component templates. Angular version is 4.3.5.
I tried to achieve it with implementing interceptors as described in angular httpClient manual (https://angul...
Puleo asked 21/9, 2017 at 13:8
1
Solved
I have an auth HttpInterceptor:
import {HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor,
HttpRequest} from '@angular/common/http';
import {AuthService} from '../service/auth.service';
...
Tomi asked 20/9, 2017 at 19:5
1
© 2022 - 2024 — McMap. All rights reserved.