MCPcopy Create free account
hub / github.com/NativeScript/sample-Groceries / register

Method register

app/shared/login.service.ts:16–30  ·  view source on GitHub ↗
(user: User)

Source from the content-addressed store, hash-verified

14 constructor(private http: Http) { }
15
16 register(user: User) {
17 let headers = new Headers();
18 headers.append("Content-Type", "application/json");
19
20 return this.http.post(
21 BackendService.apiUrl + "Users",
22 JSON.stringify({
23 Username: user.email,
24 Email: user.email,
25 Password: user.password
26 }),
27 { headers: headers }
28 )
29 .catch(this.handleErrors);
30 }
31
32 login(user: User) {
33 let headers = new Headers();

Callers 1

signUpMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected