Class CorsAssertion.Builder

  • Enclosing class:
    CorsAssertion

    public static class CorsAssertion.Builder
    extends java.lang.Object
    CORS Assertion Builder.
    • Constructor Detail

      • Builder

        public Builder()
    • 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.