Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public getUserData(username: string, password: string) {
- const httpOptions = {
- headers: new HttpHeaders({
- 'Content-Type': 'application/json',
- })
- };
- const user = new UserDTO();
- user.username = username;
- user.password = password;
- this.http.post<UserDTO>('http://localhost:8080/login', user, {observe: 'response', headers: httpOptions.headers}).subscribe(res => {
- console.log(res.headers.get('Authorization'));
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement