Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript http request

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

constructor(public http: HttpClient) {}

this.http.post(BACKEND_URL, data)
    .subscribe(
      data => {
          console.log("POST Request is successful ", data);
      },
      error => {
          console.log("Error", error);
      }
    );
 
PREVIOUS NEXT
Tagged: #typescript #http #request
ADD COMMENT
Topic
Name
5+2 =