I tried to post my email and password on login method but every time get empty params after response
With curl, I sent it and everything worked
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post))
where $post
array('email'=>'[email protected]', 'password'=>'somepass')
But when i tried post from angular i get nothing
const params = new HttpParams();
params.set('email', '[email protected]');
params.set('password', 'somepass');
this.http.post('https://myurl.com/login', '', {
params: params
}).subscribe((data) => console.log(data))
question from:
https://stackoverflow.com/questions/65918778/http-post-angular-9-params 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…