This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Rest.
Summary
Gets an instance of from
Cake.Rest.RestUtilities.Clients
, or instantiates a new one
if not found in the dictionary. Then, configures it for buffered/non-buffered read and write, forces the use
of Newtonsoft.Json as serializer, and returns the object.
- Assembly
- Cake
.Rest .dll - Namespace
- Cake
.Rest - Containing Type
- RestUtilities
Syntax
public static IRestClient GetClientInstance(string host, bool bufferedRead = true, bool bufferedWrite = true)
Parameters
Name | Type | Description |
---|---|---|
host | string | Left part of a URL or in other words, HTTP Server Authority in "http://myserver.com:8080" format. |
bufferedRead | bool | Whether the underlying System.Net.WebRequest is allowed to buffer while reading the response or not. |
bufferedWrite | bool | Whether the underlying System.Net.WebRequest is allowed to buffer while writing the request or not. |
Return Value
Type | Description |
---|---|
IRestClient | An instance of RestSharp.IRestClient ready for making REST requests. |
See Also
- RestSharp.IRestClient