Class CorsResponse
java.lang.Object
com.soklet.CorsResponse
Response headers to send over the wire for non-preflight CORS 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 ofCorsResponseviawithAccessControlAllowOrigin(String).static final classBuilder used to copy instances ofCorsResponseviacopy(). -
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.Value for theAccess-Control-Allow-Originresponse header.Value for theAccess-Control-Expose-Headersresponse header.inthashCode()toString()static CorsResponse.BuilderwithAccessControlAllowOrigin(String accessControlAllowOrigin) Acquires a builder forCorsResponseinstances.
-
Method Details
-
withAccessControlAllowOrigin
@Nonnull public static CorsResponse.Builder withAccessControlAllowOrigin(@Nonnull String accessControlAllowOrigin) Acquires a builder forCorsResponseinstances.- 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
-
getAccessControlExposeHeaders
Value for theAccess-Control-Expose-Headersresponse header.- Returns:
- the header value
-