A JSONClient for Token based authentication. Targets .NET Standard 1.4
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
JSONClient
.gitattributes
.gitignore
LICENSE
README.md

README.md

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);