Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

adding headers to httpclient angular

import { HttpHeaders } from '@angular/common/http';

...
this.http.post<any>(BACKEND_URL, postData, 
        {headers: new HttpHeaders({your-headers})})
      .subscribe(responseData => {
        ...
      });
 
PREVIOUS NEXT
Tagged: #adding #headers #httpclient #angular
ADD COMMENT
Topic
Name
7+3 =