module Roda::RodaPlugins::InvalidRequestBody::RequestMethods

def handle_invalid_request_body_empty_400(e)

Return an empty 400 HTTP response for invalid request bodies.
def handle_invalid_request_body_empty_400(e)
  response.status = 400
  headers = response.headers
  headers.clear
  headers[RodaResponseHeaders::CONTENT_TYPE] = 'text/html'
  headers[RodaResponseHeaders::CONTENT_LENGTH] ='0'
  throw :halt, response.finish_with_body([])
end