Beispiel #1
0
        public static HandlerResponse StatusDeleted(this ApiGatewayHandler handler, string resourceId)
        {
            var response = new HandlerResponse((int)HttpStatusCode.NoContent);

            response.Headers["Location"] = $"{handler.ProxyRequest.Path}{(handler.ProxyRequest.Path.EndsWith("/") ? "" : "/")}{resourceId}";
            return(response);
        }
Beispiel #2
0
        public static HandlerResponse StatusOk <TData>(this ApiGatewayHandler handler, TData data)
        {
            var response = new HandlerResponse(data, (int)HttpStatusCode.OK);

            return(response);
        }
Beispiel #3
0
 public static HandlerResponse StatusDeleted(this ApiGatewayHandler handler, Guid resourceId)
 => handler.StatusDeleted(resourceId.ToString());
Beispiel #4
0
 public static HandlerResponse StatusPatched(this ApiGatewayHandler handler, int resourceId)
 => handler.StatusPatched(resourceId.ToString());