Advertisement
dereksir

Untitled

Oct 18th, 2023 (edited)
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System;
  2. using System.Net.Http;
  3.  
  4. class Program
  5. {
  6.     static async Task Main()
  7.     {
  8.         // Create an instance of HttpClient
  9.         HttpClient httpClient = new HttpClient();
  10.  
  11.         // Define the ZenRows API URL
  12.         string zenRowsApiUrl = "https://api.zenrows.com/v1/?apikey=<YOUR_ZENROWS_API_KEY>&url=https%3A%2F%2Fwww.g2.com%2F&js_render=true&antibot=true&premium_proxy=true";
  13.  
  14.         // Make a GET request to httpbin.io/user-agent
  15.         HttpResponseMessage response = await httpClient.GetAsync(zenRowsApiUrl);
  16.  
  17.         // Read and print the content
  18.         string content = await response.Content.ReadAsStringAsync();
  19.         Console.WriteLine(content);
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement