Class CorsPreflightResponse
java.lang.Object
com.soklet.core.CorsPreflightResponse
Response headers to send over the wire for CORS preflight requests.
See https://www.soklet.com/docs/cors#writing-cors-responses for detailed documentation.
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder used to construct instances ofCorsPreflightResponse
viawithAccessControlAllowOrigin(String)
.static class
Builder used to copy instances ofCorsPreflightResponse
viacopy()
. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Vends a mutable copier seeded with this instance's data, suitable for building new instances.boolean
Value for theAccess-Control-Allow-Credentials
response header.Set of values for theAccess-Control-Allow-Headers
response header.Set of values for theAccess-Control-Allow-Methods
response header.Value for theAccess-Control-Allow-Origin
response header.Value for theAccess-Control-Max-Age
response header.int
hashCode()
toString()
withAccessControlAllowOrigin
(String accessControlAllowOrigin) Acquires a builder forCorsPreflightResponse
instances.
-
Method Details
-
withAccessControlAllowOrigin
@Nonnull public static CorsPreflightResponse.Builder withAccessControlAllowOrigin(@Nonnull String accessControlAllowOrigin) Acquires a builder forCorsPreflightResponse
instances.- Parameters:
accessControlAllowOrigin
- the requiredAccess-Control-Allow-Origin
response 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-Origin
response header.- Returns:
- the header value
-
getAccessControlAllowCredentials
Value for theAccess-Control-Allow-Credentials
response header.- Returns:
- the header value, or
Optional.empty()
if not specified
-
getAccessControlMaxAge
Value for theAccess-Control-Max-Age
response header.- Returns:
- the header value, or
Optional.empty()
if not specified
-
getAccessControlAllowMethods
Set of values for theAccess-Control-Allow-Methods
response header.- Returns:
- the header values, or the empty set if not specified
-
getAccessControlAllowHeaders
Set of values for theAccess-Control-Allow-Headers
response header.- Returns:
- the header values, or the empty set if not specified
-