Interface IFixedResponseOptions
Options for ListenerAction.fixedResponse()
.
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IFixedResponseOptions
Syntax (vb)
Public Interface IFixedResponseOptions
Remarks
ExampleMetadata: infused
Examples
ApplicationListener listener;
listener.AddAction("Fixed", new AddApplicationActionProps {
Priority = 10,
Conditions = new [] { ListenerCondition.PathPatterns(new [] { "/ok" }) },
Action = ListenerAction.FixedResponse(200, new FixedResponseOptions {
ContentType = "text/plain",
MessageBody = "OK"
})
});
Synopsis
Properties
ContentType | Content Type of the response. |
MessageBody | The response body. |
Properties
ContentType
Content Type of the response.
virtual string ContentType { get; }
Property Value
System.String
Remarks
Valid Values: text/plain | text/css | text/html | application/javascript | application/json
Default: - Automatically determined
MessageBody
The response body.
virtual string MessageBody { get; }
Property Value
System.String
Remarks
Default: - No body