This api along with the parameters is working if I use Postman, but as I’m new into Angular 4 and when I try to write the code matching postman configuration it simply doesn’t work. Can you please look at my code and let me know my mistake, thanks
<https://lh3.googleusercontent.com/-XJxi43dntYQ/Wde8pC08qmI/AAAAAAAAKDM/ETluk6WztrEWikvADFQJCUH0ClNoptB7QCLcBGAs/s1600/Untitled.png> I get the following Error. <https://lh3.googleusercontent.com/-uD2CJ0zYlg4/WdfM_u7ZumI/AAAAAAAAKDc/k7LOdr2gwlUQYpax_ckM1l6SJW7WDbYlQCLcBGAs/s1600/image.png> Here's the code. import {Injectable} from '@angular/core'; import 'rxjs/add/operator/map'; import {HttpClient} from "@angular/common/http"; @Injectable() export class PdfServiceProvider { private url:string; constructor(public http:HttpClient) { } public fetch():void { this.url = "http://www.6figureexpert.com/pdfGenerator/"; let body:any = { orientation: "portrait", paperSize : "letter", htmlContent: `<h1>Hello</h1>`, return_url : "true", }; this.http.post(this.url, body). subscribe(res => console.log(res)); } } -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
