naufalphew

curr2

Apr 21st, 2021
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Net;
  5.  
  6. namespace DynamicCurrencyConverter
  7. {
  8.     class APIRequester
  9.     {
  10.         private string url;
  11.         private WebClient client;
  12.  
  13.         public APIRequester(string url)
  14.         {
  15.             this.url = url;
  16.             client = new WebClient();
  17.         }
  18.  
  19.         public string SendAndGetResponse()
  20.         {
  21.             return client.DownloadString(url);
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment