Class Client
public class Client : IFunctionsClient, IGettableHeaders
- Inheritance
-
Client
- Implements
- Inherited Members
Constructors
Client(string)
Initializes a functions client
public Client(string baseUrl)
Parameters
baseUrl
string
Properties
GetHeaders
Function that can be set to return dynamic headers.
Headers specified in the method parameters will ALWAYS take precedence over headers returned by this function.
public Func<Dictionary<string, string>>? GetHeaders { get; set; }
Property Value
Methods
Invoke(string, string?, InvokeFunctionOptions?)
Invokes a function and returns the Text content of the response.
public Task<string> Invoke(string functionName, string? token = null, Client.InvokeFunctionOptions? options = null)
Parameters
functionName
stringFunction Name, will be appended to BaseUrl
token
stringAnon Key.
options
Client.InvokeFunctionOptionsOptions
Returns
Invoke<T>(string, string?, InvokeFunctionOptions?)
Invokes a function and returns a JSON Deserialized object according to the supplied generic Type T
public Task<T?> Invoke<T>(string functionName, string? token = null, Client.InvokeFunctionOptions? options = null) where T : class
Parameters
functionName
stringFunction Name, will be appended to BaseUrl
token
stringAnon Key.
options
Client.InvokeFunctionOptionsOptions
Returns
- Task<T>
Type Parameters
T
RawInvoke(string, string?, InvokeFunctionOptions?)
Returns an HttpContent response, allowing for coersion into Streams, Strings, and byte[]
public Task<HttpContent> RawInvoke(string functionName, string? token = null, Client.InvokeFunctionOptions? options = null)
Parameters
functionName
stringFunction Name, will be appended to BaseUrl
token
stringAnon Key.
options
Client.InvokeFunctionOptionsOptions