angular-httpclient Questions
2
Solved
I want to send an http POST request with a binary data from a file.
I get a successful server respond when I do it via postman->Body->Binary->Choose file. see image:
But I can not figure out how...
Sagunto asked 17/1, 2018 at 8:22
5
Solved
I am starting a new angular project with the CLI and am running into a no provider for HttpClient error.
I have added HttpClientModule to my module imports which seems to be the usual culprit in t...
Milreis asked 4/10, 2017 at 16:5
4
Solved
I am new to Angular & typescript , trying to understand HttpClient, observables & subscribe
When i do this in a function of a component
console.log(this.http.get('assets/user.json'));
I...
Woadwaxen asked 18/2, 2018 at 16:5
3
I am trying to incorporate payment gateway into angular app, I found following JavaScript snippet provided by the payment partner for incorporation, I tweaked it by adding ngNoForm and got it worki...
Wille asked 25/11, 2018 at 21:20
2
Solved
I'm trying to talk to a somewhat REST API from an Angular 7 front end.
To remove some item from a collection, I need to send some other data in addition to the remove unique id, namely an authenti...
Absinthism asked 3/1, 2019 at 6:4
1
Solved
I'm scrutinizing the docs for HttpClient, focusing on the get(...) method. I've prepared the following sample:
const headers: HttpHeaders = new HttpHeaders();
const observe: HttpObserve = null;
con...
Familial asked 30/6, 2020 at 6:46
5
I have created a REST API call in my Angular app which downloads a file.
I am setting responseType to 'blob' since I am expecting a file in response.
But when there is no file available at the se...
Rockribbed asked 13/12, 2018 at 9:4
1
/* error handler that will be used below in pipe with catchError()
* when resource fetched with HttpClient get() */
private _handleError<T> (operation: string, result?:T) {
return( error:...
Vanesavanessa asked 13/10, 2018 at 22:45
1
I'm curious about the usage note at the bottom of the Angular docs on HttpInterceptors, it states:
To use the same instance of HttpInterceptors for the entire app,
import the HttpClientModule o...
After asked 25/10, 2019 at 22:31
3
Solved
yes this is a very famous question , I have tried many ways mentioned in the previous stack-overflow QnA, but nothing worked. I am trying to use BANZAI-Cloud API in my application , but it gives th...
Obedient asked 26/9, 2019 at 18:18
4
Solved
The Angular docs say:
The response body doesn't return all the data you may need. Sometimes
servers return special headers or status codes to indicate certain
conditions, and inspecting those ...
Bought asked 11/12, 2017 at 20:55
3
How to utilize Angular HTTPClient's progress event to show progress in percentage of Get request which does not necessarily a file request?
Currently HTTPClient's progress event fires after reques...
Aundrea asked 26/1, 2018 at 12:28
1
I am having a problem with registering HttpInterceptor for submodule in Angular 7 application. My intention is that only requests performed from a submodule are intercepted and adjusted. The code o...
Vacua asked 22/2, 2019 at 8:5
3
Solved
Context: I'm trying to download a binary file from a backend (that requires some data posted as json-body) and save it with file-saver using the filename specified by the backend in the content-dis...
Nert asked 16/3, 2018 at 11:6
2
I have a global HttpInterceptor with a catch block which handles an HttpErrorResponse. But my requirement is that when a service makes the http call and also has an error handler i want the error h...
Moonshot asked 9/4, 2018 at 20:10
1
I am using HostListener to detect when a user reloads or closes a browser window. The purpose is to #1 check if the current user owns the 'Is Being Edited' lock on the record, and #2 if so, call an...
Aldehyde asked 17/11, 2019 at 17:26
4
Solved
i'm migrating from Http to HttpClient
I'm used to add some headers to my http requests like the following with :
import { RequestOptions, Request, RequestMethod, Headers } from '@angular/http';
...
Lynwoodlynx asked 30/5, 2018 at 14:4
0
I am getting intermittently "net::ERR_HTTP2_PROTOCOL_ERROR" for one of the API call in Angular 7 application, I am using ngrx also. All other API calls are working fine with the same configurations...
Darwinism asked 20/9, 2019 at 0:5
2
Solved
I'm trying to upload files using the http client and I'm always getting a bad response from the backend. I'm assuming that the problem resides on the request, because apart from that, everything th...
Vickievicksburg asked 15/8, 2019 at 11:52
2
Solved
Essentially my problem is - I have 6 different endpoints that return different numbers - I want to be able to send 6 requests asynchronously but using the chrome tools I see that they run sequentia...
Jdavie asked 6/8, 2019 at 14:3
2
Angular's Http module used to have a RequestOptions object which could be passed to its get method (e.g. this.http.get(fooUrl, barOptions). The RequestOptions contained any headers. This was deprec...
Pejorative asked 10/7, 2019 at 19:19
2
Solved
I'm creating a site for an assignment, where I want to dynamically load some data. Problem is, that data just comes from a website, no API or anything. Is there some way that I can use http.get in ...
Sander asked 10/7, 2019 at 11:11
1
I am using angular 7 and i need to get "Response Header" from the given API in service file without using "subscribe". please help me in this
i have tried by using many google answers but none of ...
Coverture asked 8/7, 2019 at 11:2
2
Solved
In the context of a server automatically renewing a token, I'm struggling with the basics: Obtaining header data from a response.
It does not seem to be CORS related as my Node/express allwos the A...
Brockie asked 7/11, 2017 at 10:47
1
Solved
I have the following code:
// in a service
downloadCSV(): Observable<Blob> {
return this.httpClient.get(`${apiUrl}/a.csv`, {responseType: 'blob'});
}
// in component
onDownloadClicked(event...
Intersperse asked 5/6, 2019 at 10:30
© 2022 - 2024 — McMap. All rights reserved.