How to use the HttpClientHelper
Example
Section titled “Example”- A simple example that shows how to use the NuGet package BoTech.HttpClientHelper.
- First, you obviously need to install the package:
dotnet add package BoTech.HttpClientHelper- And then you can use the package, for example, as follows:
using BoTech.HttpClientHelper;using System.Text;
Console.WriteLine("Welcome to BoTech.HttpClientHelper. \n Testing some features...");
HttpRequestHelper httpRequestHelper = new HttpRequestHelper("https://example.com/");
RequestResult<string> result = httpRequestHelper.HttpGetString("").Result;
if(result.IsSuccess()){ Console.WriteLine("Result is: " + result.ParsedData);}