JsonHCS.Net.Proxies 1.6.1

JsonHCS.Net.Proxies for .Net is a JsonHCS.Net based proxy generator for easy and fast (but powerful) api definitions

Install-Package JsonHCS.Net.Proxies -Version 1.6.1
dotnet add package JsonHCS.Net.Proxies --version 1.6.1
<PackageReference Include="JsonHCS.Net.Proxies" Version="1.6.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JsonHCS.Net.Proxies --version 1.6.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

JsonHCS.Net

JsonHCS (Json Http Client Simplified) for .Net is a HTTP Client wrapper with Json support.
JSON parsing is done by the Newtonsoft.Json library.

For more info about Json.Net.Proxies visit this page.

NuGet version (JsonHCS.Net)
NuGet version (JsonHCS.Net.Proxies)

Support

Supported platforms: .Net Standard 1.1+

Supported requests:

  • GET
  • POST
  • PUT
  • DELETE
  • File Download + Upload

Usage

  • Include the package in NuGet: https://www.nuget.org/packages/JsonHCS.Net/

  • Add the right usings

using JsonHCSNet;
  • Construct with your preferred options
var settings = new JsonHCS_Settings()
{
    CookieSupport = true,                   //I want to support sessions and thus cookies
    AddDefaultAcceptHeaders = true,         //Adds default acceptance headers for json types
    UserAgent = "MyAwesomeSampleAgent"      //Because why not, this is usually ignored anyways
};
using (JsonHCS client = new JsonHCS(settings))
{
    //use client
}
  • Use it!
//Use POCO's for data:
Console.WriteLine("Get<ExpectedResponce> ToString:");
ExpectedResponce obj = await client.GetJsonAsync<ExpectedResponce>(Url); //Gets json from url and parses as the ExpectedResponce class
Console.WriteLine(obj);

///Use dynamic
dynamic obj = await client.GetJsonAsync(Url);
Console.WriteLine(obj.firstName);

//Use JObject
var JObj = await client.GetJObjectAsync(Url);
Console.WriteLine(JObj["firstName"]);

A more complete sample can be found in the source.

Issues

Submit an issue

JsonHCS.Net

JsonHCS (Json Http Client Simplified) for .Net is a HTTP Client wrapper with Json support.
JSON parsing is done by the Newtonsoft.Json library.

For more info about Json.Net.Proxies visit this page.

NuGet version (JsonHCS.Net)
NuGet version (JsonHCS.Net.Proxies)

Support

Supported platforms: .Net Standard 1.1+

Supported requests:

  • GET
  • POST
  • PUT
  • DELETE
  • File Download + Upload

Usage

  • Include the package in NuGet: https://www.nuget.org/packages/JsonHCS.Net/

  • Add the right usings

using JsonHCSNet;
  • Construct with your preferred options
var settings = new JsonHCS_Settings()
{
    CookieSupport = true,                   //I want to support sessions and thus cookies
    AddDefaultAcceptHeaders = true,         //Adds default acceptance headers for json types
    UserAgent = "MyAwesomeSampleAgent"      //Because why not, this is usually ignored anyways
};
using (JsonHCS client = new JsonHCS(settings))
{
    //use client
}
  • Use it!
//Use POCO's for data:
Console.WriteLine("Get<ExpectedResponce> ToString:");
ExpectedResponce obj = await client.GetJsonAsync<ExpectedResponce>(Url); //Gets json from url and parses as the ExpectedResponce class
Console.WriteLine(obj);

///Use dynamic
dynamic obj = await client.GetJsonAsync(Url);
Console.WriteLine(obj.firstName);

//Use JObject
var JObj = await client.GetJObjectAsync(Url);
Console.WriteLine(JObj["firstName"]);

A more complete sample can be found in the source.

Issues

Submit an issue

Release Notes

- Changed plugin api to generic task
- Added ConfigureAwait and minimized blocking

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.6.1 106 2/17/2020
1.6.0 109 2/14/2020
1.5.3 100 11/20/2019
1.5.2 125 11/16/2019
1.5.1 141 10/23/2019
1.5.0 130 9/25/2019
1.4.0 134 7/9/2019
1.3.0 117 7/1/2019
1.2.0 194 5/22/2019
1.1.1 144 5/15/2019
1.1.0 174 3/7/2019
1.0.9 200 12/10/2018
1.0.8 215 12/6/2018
1.0.6 188 12/6/2018
1.0.5 189 12/4/2018
1.0.4 238 10/12/2018
1.0.0 222 8/23/2018