ConnectWise.Http
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ConnectWise.Http --version 1.0.0
NuGet\Install-Package ConnectWise.Http -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="ConnectWise.Http" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ConnectWise.Http --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ConnectWise.Http, 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.
// Install ConnectWise.Http as a Cake Addin #addin nuget:?package=ConnectWise.Http&version=1.0.0 // Install ConnectWise.Http as a Cake Tool #tool nuget:?package=ConnectWise.Http&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ConnectWise.Http
A .Net HttpClient wrapper for interacting with the ConnectWise Manage REST API.
Usage
Client Setup
using ConnectWise.Http;
// Create Settings
var settings = new CWApiSettings(
"https://cw.siteurl.com",
"companyName",
new MemberAuthSettings("publicKey", "privateKey")
);
// Create HTTP Client
var client = new CWHttpClient(settings);
GET Request
using ConnectWise.Http.Modules.Service;
// Build & Send Request
int ticketId = 121;
var request = ServiceModule.Tickets.GetRequest(ticketId);
var response = await client.SendAsync(request);
POST/PUT Request
You serialize the body content before building the request.
// Build & Send Request
string serializedContent = JsonConvert.SerializeObject(...);
var request = ServiceModule.Tickets.CreateRequest(serializedContent);
var response = await client.SendAsync(request);
PATCH Request
ConnectWise.Http provides a ConnectWise Patch Operation object as per their REST developer documentation.
// List Patch Operations
var operations = new List<CWPatch>();
operations.Add(new CWPatch {
Op = CWPatchOperation.Replace,
Path = "status/name",
Value = "Closed"
});
// Build & Send Request
int ticketId = 121;
var request = ServiceModule.Tickets.UpdateRequest(ticketId, operations);
var response = await client.SendAsync(request);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- Newtonsoft.Json (>= 10.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.1.1 | 24,357 | 8/22/2019 |
1.1.0 | 1,496 | 7/14/2019 |
1.0.9 | 2,581 | 10/1/2018 |
1.0.8 | 1,917 | 5/24/2018 |
1.0.7 | 1,830 | 5/24/2018 |
1.0.6 | 1,820 | 5/22/2018 |
1.0.5 | 1,901 | 4/30/2018 |
1.0.4 | 1,981 | 4/27/2018 |
1.0.3 | 1,784 | 4/26/2018 |
1.0.2 | 2,172 | 12/10/2017 |
1.0.0.1 | 1,834 | 11/22/2017 |
1.0.0 | 1,914 | 11/22/2017 |
First Release: Use CWHttpClient to simplify requests made to the Connectwise Manage REST API.