- This topic has 2 replies, 2 voices, and was last updated 5 years, 6 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Register new member with @angular/http always delivers my page
Tagged: API post register new member
Trying to register a new member following this article
always delivers my (start-)page als result.
Here’s part of my code:
import { Http } from '@angular/http';
doRegister() {
let test: any = {
'swpm_api_action_: 'create',
'key': MYKEY,
'first_name': 'Ted',
'last_name': 'Tester',
'email': 'ted.tester@tester.de'
}
return this.http.post(myurl,test,{})
}
Can you help me? Thanks in advance.
If I try to use get like
doRegister() {
return this.http.get(myurl + '?swpm_api_action=create&key=MYKEY&first_name=Ted&last_name=Tester&email=ted.tester@tester.de',{});
}
I get the following response
{“result”:”failure”,”message”:”Missing one of the mandatory fields: first_name, last_name, email”}
Is there anyone to help? Thanks in advance.
Hi Max.Maeuschen,
I have the same error, if I make a post request with json data it returns the homepage sourcecode. But if I use url parameters with post request I the same error you get “Missing one of the mandatory fields: first_name, last_name, email”.
Did you manage to solve it?
Thanks
Conor