Top "Angular-httpclient" questions

Angular HttpClient is the new HTTP client of Angular since version 4.3 from the @angular/common/http package.

Angular - HttpClient: Map Get method object result to array property

I am calling an API that returns a JSON Object. I need just the value of the array to map …

arrays json angular rxjs angular-httpclient
How do I set the baseUrl for Angular HttpClient?

I did not find a way in the documentation to set the base API URL for HTTP requests. Is it …

angular angular-httpclient
How to add multiple headers in Angular 5 HttpInterceptor

I'm trying to learn how to use HttpInterceptor to add a couple of headers to each HTTP request the app …

angular angular-http-interceptors angular-httpclient
Angular HttpClient Get method with body

I'm improving an existing API, and the requirement is to provide a single get method which can accept multiple search …

angular angular-httpclient
How to mock Angular 4.3 httpClient an error response in testing

I have a below interceptor auth-interceptor.service.ts import {Injectable, Injector} from '@angular/core'; import {HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, …

angular typescript jasmine angular-http-interceptors angular-httpclient
Angular 4/5 HttpClient: Argument of type string is not assignable to 'body'

The Angular docs say: The response body doesn't return all the data you may need. Sometimes servers return special headers …

angular typescript angular-httpclient
How to handle unauthorized requests(status with 401 or 403) with new httpClient in angular 4.3

I have an auth-interceptor.service.ts to handle the requests import {Injectable} from '@angular/core'; import {HttpErrorResponse, HttpEvent, HttpHandler, …

angular typescript angular-http angular-http-interceptors angular-httpclient
Angular 6 Get response headers with httpclient issue

I'm using the code below to try to extract a value (ReturnStatus) from the response headers; Keep-Alive: timeout=5, max=100 ReturnStatus: …

angular angular-httpclient
How to add a body to Angular HttpClient delete function

Our project is migrating to Angular4, and use @angular/common/http Httpclient as the default network tool. But I found …

angular angular-httpclient
Angular 4 Http POST not working

I hope everyone is doing great. I've recently started working with angular 4.4, i've been trying to post data to my …

javascript angular http-post angular-http angular-httpclient