public final class CorsUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
assertCorsHeaders(HttpResponse<?> response,
String origin,
HttpMethod method) |
static void |
assertCorsHeaders(HttpResponse<?> response,
String origin,
HttpMethod method,
boolean allowCredentials) |
static void |
assertCorsHeaders(HttpResponse<?> response,
String origin,
HttpMethod method,
String maxAge) |
static void |
assertCorsHeadersNotPresent(HttpResponse<?> response) |
public static void assertCorsHeadersNotPresent(HttpResponse<?> response)
response
- HTTP Response to run CORS assertions against it.public static void assertCorsHeaders(HttpResponse<?> response, String origin, HttpMethod method)
response
- HTTP Response to run CORS assertions against it.origin
- The expected value for the HTTP Header .method
- The expected value for the HTTP Header .public static void assertCorsHeaders(HttpResponse<?> response, String origin, HttpMethod method, boolean allowCredentials)
response
- HTTP Response to run CORS assertions against it.origin
- The expected value for the HTTP Header .method
- The expected value for the HTTP Header .allowCredentials
- The expected value for the HTTP Header .public static void assertCorsHeaders(HttpResponse<?> response, String origin, HttpMethod method, String maxAge)
response
- HTTP Response to run CORS assertions against it.origin
- The expected value for the HTTP Header .method
- The expected value for the HTTP Header .maxAge
- The expected value for the HTTP Header .