0
I’m making a requisition here http
for a webservice apsh
, to make request I do so:
validaLogin(user: User) {
var data = JSON.stringify({ email: user.email, senha: user.senha });
console.log(data);
return this.http.post(this.url, data)
.do(this.logResponde)
.map(this.extractData)
.catch(this.catchError);
}
private catchError(error: Response | any) {
console.log(error);
return Observable.throw(error.json().error || "Erro de conexção");
}
private logResponde(res: Response) {
console.log(res);
}
private extractData(res: Response) {
return res.json();
}
and in the webservice
receive like this:
string email = context.Request.Form["email"];
string senha = context.Request.Form["senha"];
I’m not in a position to change the ws
only the way to request.
The problem is that everything is coming null
.
Where am I going wrong ?
I’m thinking it’s a matter of
body
or something like that.
What’s the problem that’s happening?
– mercador
He’s coming in like null
– Renan Rodrigues
You can show how the method that receives the request is written?
– mercador
This in the answer.
– Renan Rodrigues
I meant the whole method of
webservice
– mercador