0

I would like to know what is the proper way to send a get request to a URL with # in it, for example http://xxx/#/home in old angularjs that still has # in their route?

I am using the .net HttpClient class, and I tried

HttpResponseMessage response = await client.GetAsync("http://xxx/#/home");

and i am getting badrequest in response until i remove the # part.

Any ideas? Thanks.

ProgrammingLlama
  • 36,677
  • 7
  • 67
  • 86
DavidBL
  • 121
  • 1
  • 6
  • This [seems to be what you want](https://stackoverflow.com/questions/24288726/scraping-webpage-generated-by-javascript-with-c-sharp). In `http://xxx/#/home`, a web browser will load `http://xxx/` (i.e. index.html, or similar), and then try to find the anchor `home` within the page. Web apps use the anchor (aka fragment) to target page states, but to do that outside the browser, you need to execute the javascript. – ProgrammingLlama Sep 13 '18 at 02:54
  • Possible duplicate of [Scraping webpage generated by javascript with C#](https://stackoverflow.com/questions/24288726/scraping-webpage-generated-by-javascript-with-c-sharp) – ProgrammingLlama Sep 13 '18 at 02:56

0 Answers0