Here is the example of ts file where service is calling and hold in Array list. import { Component } from '@angular/core' ; import { HttpClient, HttpHeaders } from '@angular/common/http' ; import { Observable, map } from 'rxjs' ; @ Component ({ selector: 'app-login' , templateUrl: './login.component.html' , styleUrls: [ './login.component.css' ] }) export class LoginComponent { baseURL : string = "https://localhost:44363/" ; Model : any ; ArrayList : any ; constructor ( private http : HttpClient ) { } onSave (){ //alert("adasd"); const headers = { 'Access-Control-Allow-Origin' : '*' , 'Access-Control-Allow-Methods' : "POST" , 'Access-Control-Allow-Headers' : "accept, content-type" } const body = "" ; console. log (body) // this.http.get(this.baseURL + 'api/Values', {responseType: 'tex