@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-07T23:46:59.795Z") @Stability(value=Experimental) public enum CorsHttpMethod extends Enum<CorsHttpMethod>
Example:
HttpApi.Builder.create(this, "HttpProxyApi")
.corsPreflight(CorsPreflightOptions.builder()
.allowHeaders(List.of("Authorization"))
.allowMethods(List.of(CorsHttpMethod.GET, CorsHttpMethod.HEAD, CorsHttpMethod.OPTIONS, CorsHttpMethod.POST))
.allowOrigins(List.of("*"))
.maxAge(Duration.days(10))
.build())
.build();
| Enum Constant and Description |
|---|
ANY
(experimental) HTTP ANY.
|
DELETE
(experimental) HTTP DELETE.
|
GET
(experimental) HTTP GET.
|
HEAD
(experimental) HTTP HEAD.
|
OPTIONS
(experimental) HTTP OPTIONS.
|
PATCH
(experimental) HTTP PATCH.
|
POST
(experimental) HTTP POST.
|
PUT
(experimental) HTTP PUT.
|
| Modifier and Type | Method and Description |
|---|---|
static CorsHttpMethod |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CorsHttpMethod[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Experimental) public static final CorsHttpMethod ANY
@Stability(value=Experimental) public static final CorsHttpMethod DELETE
@Stability(value=Experimental) public static final CorsHttpMethod GET
@Stability(value=Experimental) public static final CorsHttpMethod HEAD
@Stability(value=Experimental) public static final CorsHttpMethod OPTIONS
@Stability(value=Experimental) public static final CorsHttpMethod PATCH
@Stability(value=Experimental) public static final CorsHttpMethod POST
@Stability(value=Experimental) public static final CorsHttpMethod PUT
public static CorsHttpMethod[] values()
for (CorsHttpMethod c : CorsHttpMethod.values()) System.out.println(c);
public static CorsHttpMethod valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.