I am trying to get HTML data from any website using get API.
I have this URL: https://www.linkedin.com/
I am trying to get HTML page as text from this URL.
What I tried:
  getData() {
    const api = "https://www.linkedin.com/";
    return this.httpClient.get(api, { responseType: "text" });
  }
 ngOnInit(): void {
    this.getData().subscribe((value) => {
      console.log(value);
    });
  }
I got this error:
Access to XMLHttpRequest at 'https://www.linkedin.com/' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
What did I miss?
 
     
     
    