Méthode | Description | |
---|---|---|
AddDefaultHeader ( string key, string value ) : void |
Add default header.
|
|
ApiClient ( String basePath = "http://petstore.swagger.io/v2" ) : 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 |
Makes the HTTP request (Sync).
|
|
ConvertType ( Object source, |
Dynamically cast the object into target type. Ref: http://stackoverflow.com/questions/4925718/c-dynamic-runtime-cast
|
|
Deserialize ( string content, |
Deserialize the JSON string into a proper object.
|
|
EscapeString ( string str ) : string |
Escape string (url-encoded).
|
|
GetApiKeyWithPrefix ( string apiKeyIdentifier ) : string |
Get the API key with prefix.
|
|
ParameterToFile ( string name, Stream stream ) : |
Create FileParameter based on Stream.
|
|
ParameterToString ( object obj ) : string |
If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. If parameter is a list of string, join the list with ",". Otherwise just return the 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 | Header field name. |
value | string | Header field value. |
Résultat | void |
public ApiClient ( String basePath = "http://petstore.swagger.io/v2" ) : System | ||
basePath | String | The base path. |
Résultat | System |
public static Base64Encode ( string text ) : string | ||
text | string | String to be encoded. |
Résultat | string |
public CallApi ( String path, RestSharp method, String>.Dictionary |
||
path | String | URL path. |
method | RestSharp | HTTP method. |
queryParams | String>.Dictionary | Query parameters. |
postBody | String | HTTP body (POST request). |
headerParams | String>.Dictionary | Header parameters. |
formParams | String>.Dictionary | Form parameters. |
fileParams | FileParameter>.Dictionary | File parameters. |
authSettings | String | Authentication settings. |
Résultat | Object |
public static ConvertType ( Object source, |
||
source | Object | Object to be casted |
dest | Target type | |
Résultat | Object |
public Deserialize ( string content, |
||
content | string | HTTP body (e.g. string, JSON). |
type | Object type. | |
headers | IList |
HTTP headers. |
Résultat | object |
public EscapeString ( string str ) : string | ||
str | string | String to be escaped. |
Résultat | string |
public GetApiKeyWithPrefix ( string apiKeyIdentifier ) : string | ||
apiKeyIdentifier | string | API key identifier (authentication scheme). |
Résultat | string |
public ParameterToFile ( string name, Stream stream ) : |
||
name | string | Parameter name. |
stream | Stream | Input stream. |
Résultat |
public ParameterToString ( object obj ) : string | ||
obj | object | The parameter (header, path, query, form). |
Résultat | string |
public Serialize ( object obj ) : string | ||
obj | object | Object. |
Résultat | string |
public UpdateParamsForAuth ( String>.Dictionary |
||
queryParams | String>.Dictionary | Query parameters. |
headerParams | String>.Dictionary | Header parameters. |
authSettings | string | Authentication settings. |
Résultat | void |