Метод | Описание | |
---|---|---|
AddDefaultHeader ( string key, string value ) : void |
Add default header
|
|
ApiClient ( String basePath = "https://localhost:8102/" ) : System |
Initializes a new instance of the ApiClient class.
|
|
Base64Encode ( string text ) : string |
Encode string in base64 format
|
|
CallApi ( String Path, RestSharp Method, String>.Dictionary |
||
CallApiAsync ( String Path, RestSharp Method, String>.Dictionary |
||
Deserialize ( string content, |
Deserialize the JSON string into a proper object
|
|
EscapeString ( string str ) : string |
escape string (url-encoded)
|
|
GetApiKeyWithPrefix ( string apiKey ) : string |
Get the API key with prefix
|
|
GetDefaultHeader ( ) : String>.Dictionary |
Get default header
|
|
ParameterToString ( object obj ) : string |
if parameter is DateTime, output in ISO8601 format if parameter is a list of string, join the list with "," otherwise just return the string
|
|
SelectHeaderAccept ( String accepts ) : String |
Select the Accept header's value from the given accepts array: if JSON exists in the given array, use it; otherwise use all of them (joining into a string)
|
|
Serialize ( object obj ) : string |
Serialize an object into JSON string
|
|
UpdateParamsForAuth ( String>.Dictionary |
Update parameters based on authentication
|
public AddDefaultHeader ( string key, string value ) : void | ||
key | string | |
value | string | |
Результат | void |
public ApiClient ( String basePath = "https://localhost:8102/" ) : System | ||
basePath | String | The base path. |
Результат | System |
public static Base64Encode ( string text ) : string | ||
text | string | String to be encoded |
Результат | string |
public CallApi ( String Path, RestSharp Method, String>.Dictionary |
||
Path | String | |
Method | RestSharp | |
QueryParams | String>.Dictionary | |
PostBody | String | |
HeaderParams | String>.Dictionary | |
FormParams | String>.Dictionary | |
FileParams | String>.Dictionary | |
AuthSettings | String | |
Результат | Object |
public CallApiAsync ( String Path, RestSharp Method, String>.Dictionary |
||
Path | String | |
Method | RestSharp | |
QueryParams | String>.Dictionary | |
PostBody | String | |
HeaderParams | String>.Dictionary | |
FormParams | String>.Dictionary | |
FileParams | String>.Dictionary | |
AuthSettings | String | |
Результат | Task |
public Deserialize ( string content, |
||
content | string | |
type | ||
Результат | object |
public EscapeString ( string str ) : string | ||
str | string | |
Результат | string |
public GetApiKeyWithPrefix ( string apiKey ) : string | ||
apiKey | string | |
Результат | string |
public GetDefaultHeader ( ) : String>.Dictionary |
||
Результат | String>.Dictionary |
public ParameterToString ( object obj ) : string | ||
obj | object | |
Результат | string |
public SelectHeaderAccept ( String accepts ) : String | ||
accepts | String | The accepts array to select from. |
Результат | String |
public UpdateParamsForAuth ( String>.Dictionary |
||
QueryParams | String>.Dictionary | Query parameters |
HeaderParams | String>.Dictionary | Header parameters |
AuthSettings | string | Authentication settings |
Результат | void |