Well, I'm trying to make an http post to send a json to the server but it's giving an error. My code looks like this
the imports
import { Component, OnInit } from '@angular/core';
import { FormGroup, FormControl, FormBuilder } from "@angular/forms";
import { Http } from '@angular/http';
import { map } from 'rxjs/operators';
And here's my http post
onSubmit() {
console.log(this.formulario.value)
this.http
.post('https://httpbin.org/post', JSON.stringify(this.formulario.value)).pipe(
.map(res => res))
.subscribe(dados => console.log(dados))
}