title: Ionic Http Request
body: <p>I'm following the documentation <a href="https://developer.paypal.com/docs/api/payments/v1/#payment_get" rel="nofollow noreferrer">paypal-payment_get</a>,
  and using this command through the command prompt, returns me the required data, but does not
  I know how to use this within my Ionic project. Can anyone give me an idea?</p>
  
  <pre><code>curl -v -X GET https://api.sandbox.paypal.com/v1/payments/payment/PAY- 
  0US81985GW1191216KOY7OXA \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer Access-Token"
  </code></pre>
  
  <p>my service code:</p>
  
  <p><code>getPayment() {
  var token = 'Bearer A21AAGZftCOieiS3hugdDfR4IcDLyQR7X8ulshgTAIg6_PXj8G5xo-BZFPERYjKE2Xll67mCS9W0xrcQXugcIN_7WnhkVEBkw';
      const httpOptions = {
        headers: new HttpHeaders().set("Authorization", [token]).set("Content-Type", "application/json")
      }
      return this.http.get("https://api.sandbox.paypal.com/v1/payments/payment/PAY-0US81985GW1191216KOY7OXA", httpOptions)
        .pipe(
          catchError(this.handleError)
        );
    };</code></p>
  
  <p>and my component </p>
  
  <pre><code> this.authService.getPayment().subscribe((response) =&gt; {
    console.log(response)
  });
  </code></pre>