Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public static HandlerResponse StatusOk <TData>(this ApiGatewayHandler handler, TData data)
        {
            var response = new HandlerResponse(data, (int)HttpStatusCode.OK);

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