I do not really know what is happening, but when I send a form with an angle to the API that I have to enter it into the database if I put it in a string, the '+' character changes it to a space.
//Metodo para crear la vivienda
crearVivienda(vivienda : Vivienda): Promise<any>{
var headers = new Headers();
headers.append('Content-Type', 'application/x-www-form-urlencoded');
let options = new RequestOptions({ headers: headers });
var body = "UR="+vivienda.UR+"&num_promocion="+vivienda.num_promocion+"&Direccion="+vivienda.direccion+";
console.log(body);
return this.http.post(viviendasURLcreate, body, options)
.toPromise()
.then()
.catch(this.handleError);
}
I have tried to send the form by postman and introduce it well. How would I have to make the request to not exchange the '+' character for a space ''?
Thanks