Package io.micronaut.azure.function.http
Interface HttpRequestMessageBuilder<T>
- Type Parameters:
- T- The body type of the request
public interface HttpRequestMessageBuilder<T>
Utility interface to help with testing of Azure cloud functions.
- Since:
- 1.0
- 
Method SummaryModifier and TypeMethodDescription<B> HttpRequestMessageBuilder<B>body(B body) Sets the request body.com.microsoft.azure.functions.HttpRequestMessage<T>build()static <T> HttpRequestMessageBuilder<T>builder(com.microsoft.azure.functions.HttpMethod method, String uri, @NonNull io.micronaut.context.ApplicationContext applicationContext) Create a builder for the given application context.Sets a request header.com.microsoft.azure.functions.HttpResponseMessageinvoke()method(com.microsoft.azure.functions.HttpMethod method) Sets the request method.default HttpRequestMessageBuilder<T>method(io.micronaut.http.HttpMethod method) Sets the request method.default HttpRequestMessageBuilder<T>Sets the request method.Sets a request query parameter.default HttpRequestMessageBuilder<T>Sets the request URI.Sets the request URI.
- 
Method Details- 
methodSets the request method.- Parameters:
- method- The request method
- Returns:
- This builder
 
- 
uriSets the request URI.- Parameters:
- uri- The URI
- Returns:
- This builder
 
- 
headerSets a request header.- Parameters:
- name- The header
- value- The value
- Returns:
- The message builder
 
- 
parameterSets a request query parameter.- Parameters:
- name- The name
- value- The value
- Returns:
- The builder
 
- 
bodySets the request body.- Type Parameters:
- B- The body type
- Parameters:
- body- The body
- Returns:
- This builder
 
- 
buildcom.microsoft.azure.functions.HttpRequestMessage<T> build()- Returns:
- Builds the message
 
- 
buildEncoded- Returns:
- Builds the message
 
- 
invokecom.microsoft.azure.functions.HttpResponseMessage invoke()
- 
methodSets the request method.- Parameters:
- method- The request method
- Returns:
- This builder
 
- 
methodSets the request method.- Parameters:
- method- The request method
- Returns:
- This builder
 
- 
uriSets the request URI.- Parameters:
- uri- The URI
- Returns:
- This builder
 
- 
builderstatic <T> HttpRequestMessageBuilder<T> builder(com.microsoft.azure.functions.HttpMethod method, String uri, @NonNull @NonNull io.micronaut.context.ApplicationContext applicationContext) Create a builder for the given application context.- Type Parameters:
- T- The builder body type
- Parameters:
- method- The HTTP method
- uri- The URI
- applicationContext- The context
- Returns:
- The builder
 
 
-