angular-httpclient Questions
6
Solved
I've been looking for a solution all over the web, but couldn't find anything that fits my user case. I'm using the MEAN stack (Angular 6) and I have a registration form. I'm looking for a way to e...
Talia asked 30/11, 2018 at 15:43
0
I need to cancel a httpRequest with DELETE verb before it finishes (because user has canceled the operation)
The solution I have found seems to be just canceling the subscription to the observable,...
Greatniece asked 6/1, 2022 at 2:24
5
Solved
As the title states, I need to return multiple observables or maybe results. The goal is basically to load let's say a library list and then load books based on that library IDs. I don't want to ca...
Retinoscope asked 8/1, 2018 at 9:1
5
Solved
I'm trying fetch data via REST with angular 2 HttpClient. I'm following the angular tutorial here https://angular.io/tutorial/toh-pt6 and under the Heroes and HTTP section you'll see this snippet o...
Component asked 1/9, 2017 at 17:38
2
I'm using an HTTP interceptor in order to add auth token to requests but when the http client fires the request, this is intercepted and sent twice
This is my HttpClient call
searchProd(query: s...
Treatise asked 4/5, 2019 at 11:28
3
I'm doing a web application in Angular v11.0.2. I need to do a HTTP call to show some information on screen. To save time and to take advantage of the async pipe benefits, I'm using it in the templ...
Diapophysis asked 4/12, 2020 at 14:25
7
Solved
I am implementing a file upload service with Angular 5 and I want to give the user some feedback on the upload progress. I found several pages suggesting to use the reportProgress parameter that co...
Polite asked 16/4, 2018 at 14:53
6
Solved
i need to make an API call which allows me to pass through optional query sting params
retrieveConts(param1:string,param2?:string):Observable<IContracts> {
this.basePath = "/myConts";
r...
Oruro asked 28/5, 2018 at 10:55
7
I did not find a way in the documentation to set the base API URL for HTTP requests. Is it possible to do this with the Angular HttpClient?
Hookworm asked 17/8, 2017 at 12:52
8
Solved
i am new to angular 5 . How to code a common function to show spinner for every HTTP request in angular 5.Please help me to implement this.
Ante asked 30/4, 2018 at 12:17
3
Solved
Using Typescript/Angular 9:
const formData: FormData = new FormData();
formData.append('key', null);
console.log(formData.get('key'));
>> 'null'
this is a 'null' string, as opposed to nul...
Alpenglow asked 10/6, 2020 at 11:57
12
I wrote the following code in Angular 2:
this.http.request('http://thecatapi.com/api/images/get?format=html&results_per_page=10').
subscribe((res: Response) => {
console.log(res);
})
...
Excipient asked 13/4, 2017 at 13:52
3
I have one service which is returning the forkjoin of multiple http calls. I wanted to test this scenario.
class CommentService{
addComments(){
let ob1 = Observable.of({});
let ob2 = Observab...
Recipient asked 3/6, 2018 at 11:22
1
I'm developing an Angular application for Cordova/iOS. I get about 100 MB of data from the backend services which seems to let iOS' web-view (WKWebView) crash. At least I don't experience crashes w...
Terpineol asked 19/12, 2018 at 12:14
6
Solved
i wanted to exclude some services using interceptor.
app.module.js
providers: [
UserService,
RolesService,
{
provide: HTTP_INTERCEPTORS,
useClass: TokenInterceptor,
multi: true
},
],
Log...
Carnauba asked 10/4, 2018 at 6:13
10
Solved
Here is my code:
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
logIn(username: string, password: string) {
const url = 'http://server.com/index.php';
co...
Shawannashawl asked 24/7, 2017 at 17:38
2
Solved
When i pass string value into post method, this value was not converted JSON.
So We could not get this value in Controller.
I checked following code and find the reason why value was not converted...
Stomachic asked 2/8, 2019 at 9:44
2
Solved
In RxJS hot observables are observables which use an external producer, but a cold observable use a local producer (see e.g. RxJS Hot vs Cold Observable by Ben Lesh).
Angular HttpClient.post uses ...
Aerophagia asked 6/9, 2017 at 15:50
2
Solved
I have a application that uses a plugin that register a HttpInterceptor.
Now I need to create my own interceptor that need to be run before the other interceptor because it will change some values...
Charlinecharlock asked 4/7, 2018 at 13:10
3
I have created an interceptor which appends a token to the authorization header only needed for API calls made within a feature lazy loaded module.
However, I don't think the interceptor is being c...
Lallage asked 16/4, 2018 at 10:36
5
Solved
In my Angular 5 app a certain dataset (not changing very often) is needed multiple times on different places in the app. After the API is called, the result is stored with the Observable do operato...
Gratulation asked 12/4, 2018 at 13:31
2
Recently I have been using Interceptors with Angular HttpClient.
I add headers corresponding to some HTTP GET methods and for some I do not need those headers.
How can I tell my interceptor to co...
Blindage asked 20/8, 2017 at 10:58
1
Solved
Sorry if this is an obvious question.
I am following this tutorial: https://blog.angular-university.io/angular-jwt-authentication/
And i created the Service like in the tutorial but it tells me tha...
Easley asked 26/12, 2020 at 15:46
1
I'm trying to add error handling for HTTP request using the newer Angular's HTTP Client: https://angular.io/guide/http
In the docs, it says that error handling is done as follows:
return this.htt...
Appointee asked 5/8, 2019 at 20:22
2
Under my Angular6 app , i'm using HttpClient with some headers injection to my htpp calls to fetch data from my backend server :
My service :
@Injectable()
export class LoadUserInfosService {
p...
Deceive asked 13/7, 2018 at 11:21
© 2022 - 2024 — McMap. All rights reserved.