Class CorsAssertion.Builder

java.lang.Object
io.micronaut.http.server.tck.CorsAssertion.Builder
Enclosing class:
CorsAssertion

public static class CorsAssertion.Builder extends Object
CORS Assertion Builder.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • vary

      public CorsAssertion.Builder vary(String varyValue)
      Parameters:
      varyValue - The expected value for the HTTP Header "Vary".
      Returns:
      The Builder
    • allowCredentials

      public CorsAssertion.Builder allowCredentials(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(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
    • allowPrivateNetwork

      public CorsAssertion.Builder allowPrivateNetwork(Boolean allowPrivateNetwork)
      Parameters:
      allowPrivateNetwork - The expected value for the HTTP Header "Access-Control-Allow-Private-Network".
      Returns:
      The Builder
    • allowPrivateNetwork

      public CorsAssertion.Builder allowPrivateNetwork()
      Set expectation of value for the HTTP Header "Access-Control-Allow-Private-Network" to "true".
      Returns:
      The Builder
    • maxAge

      public CorsAssertion.Builder maxAge(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.