Package io.micronaut.http.server.tck
Class CorsAssertion.Builder
- java.lang.Object
-
- io.micronaut.http.server.tck.CorsAssertion.Builder
-
- Enclosing class:
- CorsAssertion
public static class CorsAssertion.Builder extends java.lang.ObjectCORS Assertion Builder.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CorsAssertion.BuilderallowCredentials()Set expectation of value for the HTTP Header "Access-Control-Allow-Credentials" to "true".CorsAssertion.BuilderallowCredentials(boolean allowCredentials)Set expectation of value for the HTTP Header "Access-Control-Allow-Credentials" to "true".CorsAssertion.BuilderallowCredentials(java.lang.String accessControlAllowCredentials)CorsAssertion.BuilderallowMethods(io.micronaut.http.HttpMethod method)CorsAssertion.BuilderallowOrigin(java.lang.String origin)CorsAssertionbuild()CorsAssertion.BuildermaxAge(java.lang.String maxAge)CorsAssertion.Buildervary(java.lang.String varyValue)
-
-
-
Method Detail
-
vary
public CorsAssertion.Builder vary(java.lang.String varyValue)
- Parameters:
varyValue- The expected value for the HTTP Header "Vary".- Returns:
- The Builder
-
allowCredentials
public CorsAssertion.Builder allowCredentials(java.lang.String accessControlAllowCredentials)
- Parameters:
accessControlAllowCredentials- The expected value for the HTTP Header "Access-Control-Allow-Credentials".- Returns:
- The Builder
-
allowCredentials
public CorsAssertion.Builder allowCredentials()
Set expectation of value for the HTTP Header "Access-Control-Allow-Credentials" to "true".- Returns:
- The Builder
-
allowCredentials
public CorsAssertion.Builder allowCredentials(boolean allowCredentials)
Set expectation of value for the HTTP Header "Access-Control-Allow-Credentials" to "true".- Parameters:
allowCredentials- Set expectation of value for the HTTP Header "Access-Control-Allow-Credentials"- Returns:
- The Builder
-
allowOrigin
public CorsAssertion.Builder allowOrigin(java.lang.String origin)
- Parameters:
origin- The expected value for the HTTP Header "Access-Control-Allow-Origin".- Returns:
- The Builder
-
allowMethods
public CorsAssertion.Builder allowMethods(io.micronaut.http.HttpMethod method)
- Parameters:
method- The expected value for the HTTP Header "Access-Control-Allow-Methods".- Returns:
- The Builder
-
maxAge
public CorsAssertion.Builder maxAge(java.lang.String maxAge)
- Parameters:
maxAge- The expected value for the HTTP Header "Access-Control-Max-Age".- Returns:
- The Builder
-
build
public CorsAssertion build()
- Returns:
- A CORS assertion.
-
-