Guest User

Untitled

a guest
Mar 8th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. public signin(){
  2. return this.http.post<any>(`${env.API_URL}/user/signin`, { username: user.username, password: user.password }).toPromise();
  3. }
  4.  
  5. public signin(){
  6. return this.http.post<any>(`${env.API_URL}/user/signin`, { username: user.username, password: user.password }).pipe(
  7. tap(
  8. data => this.customFunction(data),
  9. error => error
  10. )
  11. ).toPromise();
  12. }
  13.  
  14. public signin() {
  15. return this.http.post<any>(`${env.API_URL}/user/signin`, { username: user.username, password: user.password })
  16. .toPromise()
  17. .then((data) => {
  18. this.customFunction(data)
  19. })
  20. .catch(this.handleError);
  21. }
Add Comment
Please, Sign In to add comment