@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)",
date="2023-01-31T18:36:57.645Z")
public interface FixedResponseOptions
Example:
ApplicationListener listener; listener.addAction("Fixed", AddApplicationActionProps.builder() .priority(10) .conditions(List.of(ListenerCondition.pathPatterns(List.of("/ok")))) .action(ListenerAction.fixedResponse(200, FixedResponseOptions.builder() .contentType(ContentType.TEXT_PLAIN) .messageBody("OK") .build())) .build());
Modifier and Type | Interface and Description |
---|---|
static class |
FixedResponseOptions.Builder
A builder for
FixedResponseOptions |
static class |
FixedResponseOptions.Jsii$Proxy
An implementation for
FixedResponseOptions |
Modifier and Type | Method and Description |
---|---|
static FixedResponseOptions.Builder |
builder() |
default java.lang.String |
getContentType()
Content Type of the response.
|
default java.lang.String |
getMessageBody()
The response body.
|
default java.lang.String getContentType()
Valid Values: text/plain | text/css | text/html | application/javascript | application/json
Default: - Automatically determined
default java.lang.String getMessageBody()
Default: - No body
static FixedResponseOptions.Builder builder()
FixedResponseOptions.Builder
of FixedResponseOptions