Advertisement
Guest User

Untitled

a guest
Apr 18th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. loginSuccess() {
  2. console.log("Invoked Meod!");
  3. this.httpService.loginService("VariablesToThrowOver").subscribe(
  4. data => {this.httpService = data.results; console.log(data);},
  5. err => console.log(err),
  6. () => console.log('Invoked Login Service Complete'));
  7. }
  8.  
  9. loginService(httpService) {
  10. console.log("Service Function Variable: "+httpService);
  11. var body = 'username=' + "admin" + '&password=' + "admin" +'';
  12. var headers = new Headers();
  13. headers.append('Content-Type', 'application/x-www-form-urlencoded');
  14. var url = 'http://localhost/webservice/userrWS.asmx/login';
  15. return this.http.post(url,body, {headers: headers}).map(res => res.json());
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement