Hello, I have a POST request that is of content-type: x-www-form-urlencoded.
I need to pass some parameters on my Body, like this:
I'mdoingthisbelowtoaddmyparameterstotherequestbody:
ObtendoToken(): Observable<string> {
const headers = new Headers();
headers.append('Content-Type', 'application/x-www-form-urlencoded')
const body = new URLSearchParams();
body.set('grant_type', 'password');
body.set('username', 'varejo_user');
body.set('password', 'w6h5xgtl');
return this.http.post('${ApiDeSegurança}', body, new RequestOptions({headers: headers})).map(response => response.json());
}