Guest User

Untitled

a guest
May 8th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. General
  2. Request URL: http://localhost:8080/rest/user/login?username=1@1&password=12345
  3. Request Method: POST
  4. Status Code: 200
  5. Remote Address: [::1]:8080
  6. Referrer Policy: no-referrer-when-downgrade
  7.  
  8. Response
  9. Access-Control-Allow-Origin: *
  10. Cache-Control: no-cache, no-store, max-age=0, must-revalidate
  11. Content-Length: 230
  12. Date: Tue, 08 May 2018 14:31:08 GMT
  13. Expires: 0
  14. Pragma: no-cache
  15. Set-Cookie: JSESSIONID=C19E560EBF7C0F96FCE7361ECE1B7D12; Path=/; HttpOnly
  16. X-Content-Type-Options: nosniff
  17. X-Frame-Options: DENY
  18. X-XSS-Protection: 1; mode=block
  19.  
  20. Request URL: http://localhost:8080/rest/vds/list?pageNumber=0&pageSize=15
  21.  
  22. General
  23. Request URL: http://localhost:8080/rest/vds/list?pageNumber=0&pageSize=15
  24. Request Method: GET
  25. Status Code: 401
  26. Remote Address: [::1]:8080
  27. Referrer Policy: no-referrer-when-downgrade
  28.  
  29. Responce
  30. Access-Control-Allow-Origin: *
  31. Cache-Control: no-cache, no-store, max-age=0, must-revalidate
  32. Content-Type: application/json;charset=UTF-8
  33. Date: Tue, 08 May 2018 14:31:27 GMT
  34. Expires: 0
  35. Pragma: no-cache
  36. Transfer-Encoding: chunked
  37. X-Content-Type-Options: nosniff
  38. X-Frame-Options: DENY
  39. X-XSS-Protection: 1; mode=block
  40.  
  41. Request
  42. Accept: application/json, text/plain, */*
  43. Accept-Encoding: gzip, deflate, br
  44. Accept-Language: en-US,en;q=0.9,ru;q=0.8
  45. Connection: keep-alive
  46. Host: localhost:8080
  47. Origin: http://localhost:4200
  48. Referer: http://localhost:4200/vds-list
  49. User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
  50.  
  51. @Injectable()
  52. export class CoreApi {
  53. private baseUrl = 'http://localhost:8080/rest/';
  54.  
  55. constructor(public http: HttpClient) {
  56. }
  57.  
  58. public get(url: string = ''): Observable<any> {
  59. return this.http.get(this.getUrl(url));
  60. }
  61.  
  62. public post(url: string, data: any = {}): Observable < any > {
  63. return this.http.post(this.getUrl(url), data);
  64. }
  65.  
  66. private getUrl(url: string = ''): string {
  67. return this.baseUrl + url;
  68. }
  69. }
  70.  
  71. @Injectable()
  72. export class VdsService extends CoreApi {
  73.  
  74. constructor(public http : HttpClient) {
  75. super(http);
  76. }
  77.  
  78. getVdsList() : Observable < Vds[] > {
  79. return this.get(`vds/list?pageNumber=0&pageSize=15`).map((data : Vds[]) => data);
  80. }
  81.  
  82. }
Add Comment
Please, Sign In to add comment