Interface IVISABRequestHandler
Used for making Http requests to the VISAB WebApi.
Namespace: VISABConnector
Assembly: VISABConnector.dll
Syntax
public interface IVISABRequestHandler
Methods
| Improve this Doc View SourceAddDefaultHeader(String, String)
Adds an attribute value pair to the default request header.
Declaration
void AddDefaultHeader(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the attribute |
String | value | The value of the attribute |
GetDeserializedResponseAsync<TResponse>(HttpMethod, String, Object, IReadOnlyDictionary<String, String>)
Makes a request to the VISAB WebApi and deserialiazes the responses content. The given body object is serialized into a json string before sending.
Declaration
Task<ApiResponse<TResponse>> GetDeserializedResponseAsync<TResponse>(HttpMethod httpMethod, string relativeUrl, object body, IReadOnlyDictionary<string, string> queryParameters = null)
Parameters
Type | Name | Description |
---|---|---|
HttpMethod | httpMethod | The HttpMethod used for the request |
String | relativeUrl | The relative url for the request |
Object | body | The body of the request |
IReadOnlyDictionary<String, String> | queryParameters | The query parameters for the request |
Returns
Type | Description |
---|---|
Task<ApiResponse<TResponse>> | A ApiResponse object with the deserialized content if sucessful. Otherwise the content has the default value of TResponse. |
Type Parameters
Name | Description |
---|---|
TResponse | The type to deserialize into |
GetDeserializedResponseAsync<TResponse>(HttpMethod, String, String, IReadOnlyDictionary<String, String>)
Makes a request to the VISAB WebApi and deserialiazes the responses content.
Declaration
Task<ApiResponse<TResponse>> GetDeserializedResponseAsync<TResponse>(HttpMethod httpMethod, string relativeUrl, string body = null, IReadOnlyDictionary<string, string> queryParameters = null)
Parameters
Type | Name | Description |
---|---|---|
HttpMethod | httpMethod | The HttpMethod used for the request |
String | relativeUrl | The relative url for the request |
String | body | The body of the request |
IReadOnlyDictionary<String, String> | queryParameters | The query parameters for the request |
Returns
Type | Description |
---|---|
Task<ApiResponse<TResponse>> | A ApiResponse object with the deserialized content if sucessful. Otherwise the content has the default value of TResponse. |
Type Parameters
Name | Description |
---|---|
TResponse | The type to deserialize into |
GetResponseAsync(HttpMethod, String, Object, IReadOnlyDictionary<String, String>)
Makes a request to the VISAB WebApi. The given body object is serialized into a json string before sending.
Declaration
Task<ApiResponse<string>> GetResponseAsync(HttpMethod httpMethod, string relativeUrl, object body, IReadOnlyDictionary<string, string> queryParameters = null)
Parameters
Type | Name | Description |
---|---|---|
HttpMethod | httpMethod | The HttpMethod used for the request |
String | relativeUrl | The relative url for the request |
Object | body | The body of the request |
IReadOnlyDictionary<String, String> | queryParameters | The query parameters for the request |
Returns
Type | Description |
---|---|
Task<ApiResponse<String>> | A ApiResponse object with set content if successful. Content is null if not successful. |
GetResponseAsync(HttpMethod, String, String, IReadOnlyDictionary<String, String>)
Makes a request to the VISAB WebApi.
Declaration
Task<ApiResponse<string>> GetResponseAsync(HttpMethod httpMethod, string relativeUrl, string body = null, IReadOnlyDictionary<string, string> queryParameters = null)
Parameters
Type | Name | Description |
---|---|---|
HttpMethod | httpMethod | The HttpMethod used for the request |
String | relativeUrl | The relative url for the request |
String | body | The body of the request |
IReadOnlyDictionary<String, String> | queryParameters | The query parameters for the request |
Returns
Type | Description |
---|---|
Task<ApiResponse<String>> | A ApiResponse object with set content if successful. Content is null if not successful. |