get status of response angular code example
Example: angular http get status code
import { HttpClient, HttpHeaders, HttpParams, } from '@angular/common/http';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
sendMsz(obj):Observable<any> {
return this.http.get(this.urlSer.url,{responseType:'text', params:params, observe: 'response'}).pipe(map(data => {
console.log("Here will be return response code Ex :200", data.status)
return data.status
}));
}