Demo entry 6642633

Login of authservice


Submitted by anonymous on Sep 24, 2017 at 23:42
Language: TypeScript. Code size: 346 Bytes.

login(user: User) {
    const body = JSON.stringify(user);
    const headers = new Headers({'Content-Type': 'application/json'});
    return'http://localhost:3000/user/login', body, {headers: headers})
      .map((response: Response) => response.json())
      .catch((error: Response) => Observable.throw(error.json()));

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).