Class ApiClient
API client is mainly responsible for making the HTTP call to the API backend.
public class ApiClient
- Inheritance
-
ApiClient
- Inherited Members
Constructors
ApiClient()
Initializes a new instance of the ApiClient class with default configuration.
public ApiClient()
ApiClient(Configuration)
Initializes a new instance of the ApiClient class with default base path ApiBaseUrl.
public ApiClient(Configuration config)
Parameters
config
ConfigurationAn instance of Configuration.
ApiClient(string)
Initializes a new instance of the ApiClient class with default configuration.
public ApiClient(string basePath = "https://api.boldsign.com")
Parameters
basePath
stringThe base path.
ApiClient(string, string)
Initializes a new instance of the ApiClient class
public ApiClient(string basePath, string apiKey)
Parameters
Fields
XApiKey
X-API-KEY for ApiKey.
public const string XApiKey = "X-API-KEY"
Field Value
- string
X-API-KEY for ApiKey.
Properties
ApiKey
Initializes a new instance of the ApiClient class
public string ApiKey { get; set; }
Property Value
Configuration
Gets or sets an instance of the IReadableConfiguration.
public IReadableConfiguration Configuration { get; set; }
Property Value
- IReadableConfiguration
An instance of the IReadableConfiguration.
Remarks
IReadableConfiguration helps us to avoid modifying possibly global configuration values from within a given client. It does not guarantee thread-safety of the Configuration instance in any way.
Methods
EscapeString(string)
Escape string (url-encoded).
public string EscapeString(string str)
Parameters
str
stringString to be escaped.
Returns
- string
Escaped string.
IsJsonMime(string)
Check if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json; charset=UTF8 APPLICATION/JSON application/vnd.company+json
public bool IsJsonMime(string mime)
Parameters
mime
stringMIME
Returns
- bool
Returns True if MIME type is json.