Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Net.Http;
- namespace TestApplication {
- class Test {
- static async Task Main(string[] args) {
- string apiUrl = "https://api.zenrows.com/v1/?apikey=<YOUR_ZENROWS_API_KEY>&url=https%3A%2F%2Fwww.g2.com%2Fproducts%2Fasana%2Freviews&js_render=true&premium_proxy=true";
- using (HttpClient client = new HttpClient()) {
- HttpResponseMessage response = await client.GetAsync(apiUrl);
- if (response.IsSuccessStatusCode) {
- string content = await response.Content.ReadAsStringAsync();
- Console.WriteLine(content);
- }
- else {
- Console.WriteLine($"Failed to retrieve data. Status code: {response.StatusCode}");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement