I don't know very well what is happening, but when I send a form with angular to the API that I have so that it enters it into the database if I put the '+' character in a string, it 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 it enters it well. How would I have to make the request so that it does not exchange the character '+' for a space ' '
Thank you