Interface IHttpRestServiceClient
Interface with the default methods and properties to be used for all HTTP Rest calls.
Namespace: StoneCo.Framework.Services.Client
Assembly: cs.temp.dll.dll
Syntax
public interface IHttpRestServiceClient
Properties
BaseAddress
URL that identify host of the HTTP Rest API call.
Declaration
string BaseAddress { get; }
Property Value
Type | Description |
---|---|
System.String |
MediaTypeAccept
Types of media accepted in the request.
Declaration
string[] MediaTypeAccept { get; }
Property Value
Type | Description |
---|---|
System.String[] | ["application/json", "application/x-www-form-urlencoded"] |
Name
The logical name of the client to create.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
System.String | MyConnector, MyClient, ... |
Methods
DeleteAsync<TRequestMessage>(String, String, TRequestMessage, Int32, String[])
Asynchronous call to the verb Delete.
Declaration
Task<ResultResponseMessage> DeleteAsync<TRequestMessage>(string clientName, string uri, TRequestMessage requestMessage, int timeoutInSeconds = 180, params string[] mediaTypeAccept)
where TRequestMessage : RequestMessage, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | clientName | The logical name of the client to create. |
System.String | uri | Path that composes the URL by creating the endpoint that is used in the HTTP Rest call. |
TRequestMessage | requestMessage | Object that represent the request. |
System.Int32 | timeoutInSeconds | Value that represent in seconds the timeout. |
System.String[] | mediaTypeAccept | Types of media accepted in the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResultResponseMessage> | Object with the default and consolidated result of the request. |
Type Parameters
Name | Description |
---|---|
TRequestMessage | The type of the request to be used in the call. |
DeleteAsync<TRequestMessage, TResponseMessage>(String, String, TRequestMessage, Int32, String[])
Asynchronous call to the verb Delete.
Declaration
Task<ResultResponseMessage<TResponseMessage>> DeleteAsync<TRequestMessage, TResponseMessage>(string clientName, string uri, TRequestMessage requestMessage, int timeoutInSeconds = 180, params string[] mediaTypeAccept)
where TRequestMessage : RequestMessage, new()
where TResponseMessage : ResponseMessage, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | clientName | The logical name of the client to create. |
System.String | uri | Path that composes the URL by creating the endpoint that is used in the HTTP Rest call. |
TRequestMessage | requestMessage | Object that represent the request. |
System.Int32 | timeoutInSeconds | Value that represent in seconds the timeout. |
System.String[] | mediaTypeAccept | Types of media accepted in the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResultResponseMessage<TResponseMessage>> | Object with the default and consolidated result of the request. |
Type Parameters
Name | Description |
---|---|
TRequestMessage | The type of the request to be used in the call. |
TResponseMessage | The type of the response to be returned in the result. |
GetAsync<TRequestMessage, TResponseMessage>(String, String, TRequestMessage, Int32, String[])
Asynchronous call to the verb Get.
Declaration
Task<ResultResponseMessage<TResponseMessage>> GetAsync<TRequestMessage, TResponseMessage>(string clientName, string uri, TRequestMessage requestMessage, int timeoutInSeconds = 180, params string[] mediaTypeAccept)
where TRequestMessage : RequestMessage, new()
where TResponseMessage : ResponseMessage, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | clientName | The logical name of the client to create. |
System.String | uri | Path that composes the URL by creating the endpoint that is used in the HTTP Rest call. |
TRequestMessage | requestMessage | Object that represent the request. |
System.Int32 | timeoutInSeconds | Value that represent in seconds the timeout. |
System.String[] | mediaTypeAccept | Types of media accepted in the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResultResponseMessage<TResponseMessage>> | Object with the default and consolidated result of the request. |
Type Parameters
Name | Description |
---|---|
TRequestMessage | The type of the request to be used in the call. |
TResponseMessage | The type of the response to be returned in the result. |
PostAsync<TRequestMessage>(String, String, TRequestMessage, Int32, String[])
Asynchronous call to the verb Post and without response on the return.
Declaration
Task<ResultResponseMessage> PostAsync<TRequestMessage>(string clientName, string uri, TRequestMessage requestMessage, int timeoutInSeconds = 180, params string[] mediaTypeAccept)
where TRequestMessage : RequestMessage, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | clientName | The logical name of the client to create. |
System.String | uri | Path that composes the URL by creating the endpoint that is used in the HTTP Rest call. |
TRequestMessage | requestMessage | Object that represent the request. |
System.Int32 | timeoutInSeconds | Value that represent in seconds the timeout. |
System.String[] | mediaTypeAccept | Types of media accepted in the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResultResponseMessage> | Object with the default and consolidated result of the request. |
Type Parameters
Name | Description |
---|---|
TRequestMessage | The type of the request to be used in the call. |
PostAsync<TRequestMessage, TResponseMessage>(String, String, TRequestMessage, Int32, String[])
Asynchronous call to the verb Post and response on the return.
Declaration
Task<ResultResponseMessage<TResponseMessage>> PostAsync<TRequestMessage, TResponseMessage>(string clientName, string uri, TRequestMessage requestMessage, int timeoutInSeconds = 180, params string[] mediaTypeAccept)
where TRequestMessage : RequestMessage, new()
where TResponseMessage : ResponseMessage, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | clientName | The logical name of the client to create. |
System.String | uri | Path that composes the URL by creating the endpoint that is used in the HTTP Rest call. |
TRequestMessage | requestMessage | Object that represent the request. |
System.Int32 | timeoutInSeconds | Value that represent in seconds the timeout. |
System.String[] | mediaTypeAccept | Types of media accepted in the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResultResponseMessage<TResponseMessage>> | Object with the default and consolidated result of the request. |
Type Parameters
Name | Description |
---|---|
TRequestMessage | The type of the request to be used in the call. |
TResponseMessage | The type of the response to be returned in the result. |
PostGzipAsync<TRequestMessage>(String, String, TRequestMessage, Int32, String[])
Asynchronous call to the Post verb with the request compressed via gzip and without response on the return.
Declaration
Task<ResultResponseMessage> PostGzipAsync<TRequestMessage>(string clientName, string uri, TRequestMessage requestMessage, int timeoutInSeconds = 180, params string[] mediaTypeAccept)
where TRequestMessage : RequestMessage, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | clientName | The logical name of the client to create. |
System.String | uri | Path that composes the URL by creating the endpoint that is used in the HTTP Rest call. |
TRequestMessage | requestMessage | Object that represent the request. |
System.Int32 | timeoutInSeconds | Value that represent in seconds the timeout. |
System.String[] | mediaTypeAccept | Types of media accepted in the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResultResponseMessage> | Object with the default and consolidated result of the request. |
Type Parameters
Name | Description |
---|---|
TRequestMessage | The type of the request to be used in the call. |
PostGzipAsync<TRequestMessage, TResponseMessage>(String, String, TRequestMessage, Int32, String[])
Asynchronous call to the Post verb with the request compressed via gzip and response on return.
Declaration
Task<ResultResponseMessage<TResponseMessage>> PostGzipAsync<TRequestMessage, TResponseMessage>(string clientName, string uri, TRequestMessage requestMessage, int timeoutInSeconds = 180, params string[] mediaTypeAccept)
where TRequestMessage : RequestMessage, new()
where TResponseMessage : ResponseMessage, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | clientName | The logical name of the client to create. |
System.String | uri | Path that composes the URL by creating the endpoint that is used in the HTTP Rest call. |
TRequestMessage | requestMessage | Object that represent the request. |
System.Int32 | timeoutInSeconds | Value that represent in seconds the timeout. |
System.String[] | mediaTypeAccept | Types of media accepted in the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResultResponseMessage<TResponseMessage>> | Object with the default and consolidated result of the request. |
Type Parameters
Name | Description |
---|---|
TRequestMessage | The type of the request to be used in the call. |
TResponseMessage | The type of the response to be returned in the result. |
PutAsync<TRequestMessage>(String, String, TRequestMessage, Int32, String[])
Asynchronous call to the verb Put and without response on the return.
Declaration
Task<ResultResponseMessage> PutAsync<TRequestMessage>(string clientName, string uri, TRequestMessage requestMessage, int timeoutInSeconds = 180, params string[] mediaTypeAccept)
where TRequestMessage : RequestMessage, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | clientName | The logical name of the client to create. |
System.String | uri | Path that composes the URL by creating the endpoint that is used in the HTTP Rest call. |
TRequestMessage | requestMessage | Object that represent the request. |
System.Int32 | timeoutInSeconds | Value that represent in seconds the timeout. |
System.String[] | mediaTypeAccept | Types of media accepted in the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResultResponseMessage> | Object with the default and consolidated result of the request. |
Type Parameters
Name | Description |
---|---|
TRequestMessage | The type of the request to be used in the call. |
PutAsync<TRequestMessage, TResponseMessage>(String, String, TRequestMessage, Int32, String[])
Asynchronous call to the verb Put and response on the return.
Declaration
Task<ResultResponseMessage<TResponseMessage>> PutAsync<TRequestMessage, TResponseMessage>(string clientName, string uri, TRequestMessage requestMessage, int timeoutInSeconds = 180, params string[] mediaTypeAccept)
where TRequestMessage : RequestMessage, new()
where TResponseMessage : ResponseMessage, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | clientName | The logical name of the client to create. |
System.String | uri | Path that composes the URL by creating the endpoint that is used in the HTTP Rest call. |
TRequestMessage | requestMessage | Object that represent the request. |
System.Int32 | timeoutInSeconds | Value that represent in seconds the timeout. |
System.String[] | mediaTypeAccept | Types of media accepted in the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResultResponseMessage<TResponseMessage>> | Object with the default and consolidated result of the request. |
Type Parameters
Name | Description |
---|---|
TRequestMessage | The type of the request to be used in the call. |
TResponseMessage | The type of the response to be returned in the result. |
PutGzipAsync<TRequestMessage>(String, String, TRequestMessage, Int32, String[])
Asynchronous call to the Put verb with the request compressed via gzip and without response on the return.
Declaration
Task<ResultResponseMessage> PutGzipAsync<TRequestMessage>(string clientName, string uri, TRequestMessage requestMessage, int timeoutInSeconds = 180, params string[] mediaTypeAccept)
where TRequestMessage : RequestMessage, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | clientName | The logical name of the client to create. |
System.String | uri | Path that composes the URL by creating the endpoint that is used in the HTTP Rest call. |
TRequestMessage | requestMessage | Object that represent the request. |
System.Int32 | timeoutInSeconds | Value that represent in seconds the timeout. |
System.String[] | mediaTypeAccept | Types of media accepted in the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResultResponseMessage> | Object with the default and consolidated result of the request. |
Type Parameters
Name | Description |
---|---|
TRequestMessage | The type of the request to be used in the call. |
PutGzipAsync<TRequestMessage, TResponseMessage>(String, String, TRequestMessage, Int32, String[])
Asynchronous call to the Put verb with the request compressed via gzip and response on return.
Declaration
Task<ResultResponseMessage<TResponseMessage>> PutGzipAsync<TRequestMessage, TResponseMessage>(string clientName, string uri, TRequestMessage requestMessage, int timeoutInSeconds = 180, params string[] mediaTypeAccept)
where TRequestMessage : RequestMessage, new()
where TResponseMessage : ResponseMessage, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | clientName | The logical name of the client to create. |
System.String | uri | Path that composes the URL by creating the endpoint that is used in the HTTP Rest call. |
TRequestMessage | requestMessage | Object that represent the request. |
System.Int32 | timeoutInSeconds | Value that represent in seconds the timeout. |
System.String[] | mediaTypeAccept | Types of media accepted in the request. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResultResponseMessage<TResponseMessage>> | Object with the default and consolidated result of the request. |
Type Parameters
Name | Description |
---|---|
TRequestMessage | The type of the request to be used in the call. |
TResponseMessage | The type of the response to be returned in the result. |