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 Summary
Modifier 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.HttpResponseMessage
invoke()
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
-
method
Sets the request method.- Parameters:
method
- The request method- Returns:
- This builder
-
uri
Sets the request URI.- Parameters:
uri
- The URI- Returns:
- This builder
-
header
Sets a request header.- Parameters:
name
- The headervalue
- The value- Returns:
- The message builder
-
parameter
Sets a request query parameter.- Parameters:
name
- The namevalue
- The value- Returns:
- The builder
-
body
Sets the request body.- Type Parameters:
B
- The body type- Parameters:
body
- The body- Returns:
- This builder
-
build
com.microsoft.azure.functions.HttpRequestMessage<T> build()- Returns:
- Builds the message
-
buildEncoded
- Returns:
- Builds the message
-
invoke
com.microsoft.azure.functions.HttpResponseMessage invoke() -
method
Sets the request method.- Parameters:
method
- The request method- Returns:
- This builder
-
method
Sets the request method.- Parameters:
method
- The request method- Returns:
- This builder
-
uri
Sets the request URI.- Parameters:
uri
- The URI- Returns:
- This builder
-
builder
static <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 methoduri
- The URIapplicationContext
- The context- Returns:
- The builder
-