Class CorsPreflightResponse
java.lang.Object
com.soklet.CorsPreflightResponse
Response headers to send over the wire for CORS preflight requests.
Instances can be acquired via the withAccessControlAllowOrigin(String) builder factory method.
See https://www.soklet.com/docs/cors#writing-cors-responses for detailed documentation.
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder used to construct instances ofCorsPreflightResponseviawithAccessControlAllowOrigin(String).static final classBuilder used to copy instances ofCorsPreflightResponseviacopy(). -
Method Summary
Modifier and TypeMethodDescriptioncopy()Vends a mutable copier seeded with this instance's data, suitable for building new instances.booleanValue for theAccess-Control-Allow-Credentialsresponse header.Set of values for theAccess-Control-Allow-Headersresponse header.Set of values for theAccess-Control-Allow-Methodsresponse header.Value for theAccess-Control-Allow-Originresponse header.Value for theAccess-Control-Max-Ageresponse header.inthashCode()toString()withAccessControlAllowOrigin(String accessControlAllowOrigin) Acquires a builder forCorsPreflightResponseinstances.
-
Method Details
-
withAccessControlAllowOrigin
@Nonnull public static CorsPreflightResponse.Builder withAccessControlAllowOrigin(@Nonnull String accessControlAllowOrigin) Acquires a builder forCorsPreflightResponseinstances.- Parameters:
accessControlAllowOrigin- the requiredAccess-Control-Allow-Originresponse header value- Returns:
- the builder
-
copy
Vends a mutable copier seeded with this instance's data, suitable for building new instances.- Returns:
- a copier for this instance
-
toString
-
equals
-
hashCode
-
getAccessControlAllowOrigin
Value for theAccess-Control-Allow-Originresponse header.- Returns:
- the header value
-
getAccessControlAllowCredentials
Value for theAccess-Control-Allow-Credentialsresponse header.- Returns:
- the header value, or
Optional.empty()if not specified
-
getAccessControlMaxAge
Value for theAccess-Control-Max-Ageresponse header.- Returns:
- the header value, or
Optional.empty()if not specified
-
getAccessControlAllowMethods
Set of values for theAccess-Control-Allow-Methodsresponse header.- Returns:
- the header values, or the empty set if not specified
-
getAccessControlAllowHeaders
Set of values for theAccess-Control-Allow-Headersresponse header.- Returns:
- the header values, or the empty set if not specified
-