Exemple #1
0
 public async Task <APIGatewayProxyResponse> GetHello(APIGatewayProxyRequest request, ILambdaContext context)
 {
     if (request.IsKeepWarm())
     {
         return(this.Warmed());
     }
     return("ok".Ok());
 }
Exemple #2
0
        public async Task <APIGatewayProxyResponse> SaveHello(APIGatewayProxyRequest request, ILambdaContext context)
        {
            Log.Debug("Calling GET /SaveHello");
            if (request.IsKeepWarm())
            {
                this.Warmed();
            }

            return("ok".Ok());
        }
        public void IsKeepWarm(string key, string value, bool isWarm)
        {
            var headers = new Dictionary <string, string> {
                { key, value }
            };
            var request = new APIGatewayProxyRequest {
                Headers = headers
            };

            request.IsKeepWarm().Should().Be(isWarm);
        }