RMSRestClient.Net
1.0.0
dotnet add package RMSRestClient.Net --version 1.0.0
NuGet\Install-Package RMSRestClient.Net -Version 1.0.0
<PackageReference Include="RMSRestClient.Net" Version="1.0.0" />
<PackageVersion Include="RMSRestClient.Net" Version="1.0.0" />
<PackageReference Include="RMSRestClient.Net" />
paket add RMSRestClient.Net --version 1.0.0
#r "nuget: RMSRestClient.Net, 1.0.0"
#:package RMSRestClient.Net@1.0.0
#addin nuget:?package=RMSRestClient.Net&version=1.0.0
#tool nuget:?package=RMSRestClient.Net&version=1.0.0
REST Client
Overview This is a REST client implementation in C# .net framework 4.8 that provides a simple way to make HTTP/HTTPS requests to a server.
Features Supports GET, POST, and DELETE requests Allows for authentication using a bearer token Supports query parameters and body data Returns a response object with status code and content Usage ////GET///////////
RMSRestClient.BaseURL = "https://localhost:7232/api"; RMSRestClient.Token = token;
RMSRestClient.ActionURL = "Account";
URLParameter urlParam = new URLParameter(); urlParam.Add("AccountNo", "1234567890");
RMSRestClient.Parameters = urlParam;
//RMSRestClient.ParameterType = ParameterType.FromQuery;
var result = RMSRestClient.ExecuteRequestAsync();
string sc = result.Result.Content;
var departments = JsonConvert.DeserializeObject<StatementAccount>(sc);
Console.WriteLine("Account No {0} and Mobile No {1}", departments.ACCOUNT_ID, departments.MOBILE_NO);
/////DELETE
RMSRestClient.BaseURL = "https://localhost:7232/api/"; RMSRestClient.Token = token;
RMSRestClient.ActionURL = "DepartmentInfo";
RMSRestClient.Method = MethodType.DELETE;
URLParameter urlParam = new URLParameter(); urlParam.Add("DepartmentID", "5");
RMSRestClient.Parameters = urlParam;
var result = RMSRestClient.ExecuteRequestAsync();
///////POST///////////
RMSRestClient.BaseURL = "https://localhost:7232/api/"; RMSRestClient.Token = token;
RMSRestClient.ActionURL = "DepartmentInfo";
DepartmentInfo department = new DepartmentInfo { DepartmentID = 5, Department = "Customer Service", CompanyID = 1 };
RMSRestClient.Method = MethodType.POST;
var result = RMSRestClient.ExecuteRequestAsync(department, null);
string sc = result.Result;
var departments = JsonConvert.DeserializeObject<List<DepartmentInfo>>(sc); foreach (var dept in departments) { Console.WriteLine(dept.Department); }
ExecuteRequestAsync This method is used to execute a request to the server. It takes in several parameters:
Method: The HTTP method to use (GET, POST, DELETE) PostedData: The data to be sent in the request body Parameters: The query parameters to be sent with the request Token: The authentication token to use
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 295 | 3/5/2025 |
Summary of changes made in this release of the package.