Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 1.12 KB

README.md

File metadata and controls

27 lines (21 loc) · 1.12 KB

StandardJSONClient

A .NET Standard 1.4 based Client to access a WebAPI behindet a Token security system.

Nuget Package

https://www.nuget.org/packages/StandardJSONClient

How to use

First you must initalize the following attributes via resource file.

Resource File

// Init JSONClient
JsonClient.Client.ApiBaseUrl = Properties.Resources.ApiBaseUrl;
JsonClient.Client.ApiPassword = Properties.Resources.ApiPassword;
JsonClient.Client.ApiProjectPath = Properties.Resources.ApiProjectPath;
JsonClient.Client.ApiTokenPath = Properties.Resources.ApiTokenPath;
JsonClient.Client.ApiUserName = Properties.Resources.ApiUserName;
var response = JsonClient.Client.GetRequest<List<Patient>>(
                requestPath: "/api/Patients").Result;

Console.WriteLine(response[0].FirstName);
Console.WriteLine(response[0].LastName);