daily pastebin goal
77%
SHARE
TWEET

Untitled

a guest May 26th, 2018 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. protected async getQueryResultAsync<T>(headers?: HttpHeaders): Promise<T> {
  2.     const proxyUrl: string = this.getProxyUrl().toString();
  3.  
  4.     if (headers === undefined) {
  5.         headers = new HttpHeaders();
  6.     }
  7.  
  8.     headers = headers.append('Access-Control-Allow-Origin', '*');
  9.  
  10.     return await this.root.httpClient.post(proxyUrl, { headers: headers })
  11.                                      .map(response => (<any>response).json())
  12.                                      .catch(error => Observable.throw('Error while connecting to the proxy.'))
  13.                                      .toPromise();
  14. }
  15.    
  16. "dependencies": {
  17. "@angular/animations": "^6.0.3",
  18. "@angular/cdk": "^6.1.0",
  19. "@angular/common": "^6.0.0",
  20. "@angular/compiler": "^6.0.0",
  21. "@angular/core": "^6.0.0",
  22. "@angular/forms": "^6.0.0",
  23. "@angular/http": "^6.0.0",
  24. "@angular/material": "^6.1.0",
  25. "@angular/platform-browser": "^6.0.0",
  26. "@angular/platform-browser-dynamic": "^6.0.0",
  27. "@angular/router": "^6.0.0",
  28. "core-js": "^2.5.4",
  29. "material-design-icons": "^3.0.1",
  30. "primeng": "^6.0.0-alpha.1",
  31. "rxjs": "^6.2.0",
  32. "rxjs-compat": "^6.2.0",
  33. "zone.js": "^0.8.26"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top