Class CorsResponse
java.lang.Object
com.soklet.core.CorsResponse
Response headers to send over the wire for non-preflight CORS 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 ofCorsResponse
viawithAccessControlAllowOrigin(String)
.static class
Builder used to copy instances ofCorsResponse
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.Value for theAccess-Control-Allow-Origin
response header.Value for theAccess-Control-Expose-Headers
response header.int
hashCode()
toString()
static CorsResponse.Builder
withAccessControlAllowOrigin
(String accessControlAllowOrigin) Acquires a builder forCorsResponse
instances.
-
Method Details
-
withAccessControlAllowOrigin
@Nonnull public static CorsResponse.Builder withAccessControlAllowOrigin(@Nonnull String accessControlAllowOrigin) Acquires a builder forCorsResponse
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
-
getAccessControlExposeHeaders
Value for theAccess-Control-Expose-Headers
response header.- Returns:
- the header value
-