Class FnHttpTest
java.lang.Object
io.micronaut.oraclecloud.function.http.test.FnHttpTest
Testing support for functions.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <I> io.micronaut.http.HttpResponse<String>
Invoke a function via HTTP.static <I> io.micronaut.http.HttpResponse<String>
Invoke a function via HTTP.static <I> io.micronaut.http.HttpResponse<String>
invoke
(io.micronaut.http.HttpRequest<I> request) Invoke a function via HTTP.static <I,
O> io.micronaut.http.HttpResponse<O> invoke
(io.micronaut.http.HttpRequest<I> request, io.micronaut.core.type.Argument<O> resultType) Invoke a function via HTTP.static <I,
O> io.micronaut.http.HttpResponse<O> invoke
(io.micronaut.http.HttpRequest<I> request, io.micronaut.core.type.Argument<O> resultType, List<Class<?>> sharedClasses) Invoke a function via HTTP.static <I,
O> io.micronaut.http.HttpResponse<O> Invoke a function via HTTP.static <I,
O> io.micronaut.http.HttpResponse<O> Invoke a function via HTTP.static <I> io.micronaut.http.HttpResponse<String>
Invoke a function via HTTP.
-
Constructor Details
-
FnHttpTest
public FnHttpTest()
-
-
Method Details
-
invoke
public static <I> io.micronaut.http.HttpResponse<String> invoke(io.micronaut.http.HttpRequest<I> request) Invoke a function via HTTP.- Type Parameters:
I
- The body type- Parameters:
request
- The request- Returns:
- The result
-
invoke
public static <I> io.micronaut.http.HttpResponse<String> invoke(io.micronaut.http.HttpRequest<I> request, List<Class<?>> sharedClasses) Invoke a function via HTTP.- Type Parameters:
I
- The body type- Parameters:
request
- The requestsharedClasses
- optional classes to share between the test classloader and the FN classloader- Returns:
- The result
-
invoke
public static <I> io.micronaut.http.HttpResponse<String> invoke(io.micronaut.http.HttpMethod method, String uri) Invoke a function via HTTP.- Type Parameters:
I
- The body type- Parameters:
method
- The http methoduri
- The uri- Returns:
- The result
-
invoke
public static <I> io.micronaut.http.HttpResponse<String> invoke(io.micronaut.http.HttpMethod method, String uri, List<Class<?>> sharedClasses) Invoke a function via HTTP.- Type Parameters:
I
- The body type- Parameters:
method
- The http methoduri
- The urisharedClasses
- optional classes to share between the test classloader and the FN classloader- Returns:
- The result
-
invoke
public static <I,O> io.micronaut.http.HttpResponse<O> invoke(io.micronaut.http.HttpRequest<I> request, Class<O> resultType) Invoke a function via HTTP.- Type Parameters:
I
- The input typeO
- The output type- Parameters:
request
- The requestresultType
- The result type- Returns:
- The response
-
invoke
public static <I,O> io.micronaut.http.HttpResponse<O> invoke(io.micronaut.http.HttpRequest<I> request, Class<O> resultType, List<Class<?>> sharedClasses) Invoke a function via HTTP.- Type Parameters:
I
- The input typeO
- The output type- Parameters:
request
- The requestresultType
- The result typesharedClasses
- optional classes to share between the test classloader and the FN classloader- Returns:
- The response
-
invoke
public static <I,O> io.micronaut.http.HttpResponse<O> invoke(io.micronaut.http.HttpRequest<I> request, io.micronaut.core.type.Argument<O> resultType) Invoke a function via HTTP.- Type Parameters:
I
- The input typeO
- The output type- Parameters:
request
- The requestresultType
- The result type- Returns:
- The response
-
invoke
public static <I,O> io.micronaut.http.HttpResponse<O> invoke(io.micronaut.http.HttpRequest<I> request, io.micronaut.core.type.Argument<O> resultType, List<Class<?>> sharedClasses) Invoke a function via HTTP.- Type Parameters:
I
- The input typeO
- The output type- Parameters:
request
- The requestresultType
- The result typesharedClasses
- optional classes to share between the test classloader and the FN classloader- Returns:
- The response
-