RMSRestClient.Net 1.0.0

dotnet add package RMSRestClient.Net --version 1.0.0
                    
NuGet\Install-Package RMSRestClient.Net -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RMSRestClient.Net" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RMSRestClient.Net" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="RMSRestClient.Net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RMSRestClient.Net --version 1.0.0
                    
#r "nuget: RMSRestClient.Net, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RMSRestClient.Net@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RMSRestClient.Net&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=RMSRestClient.Net&version=1.0.0
                    
Install as a Cake Tool

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 Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.