Use request.content_type

This commit is contained in:
Serdar Dogruyol 2017-09-04 18:54:06 +03:00
parent a1520de7ed
commit b8e3298925

View file

@ -41,7 +41,7 @@ module Kemal
{% end %} {% end %}
private def parse_body private def parse_body
content_type = @request.headers["Content-Type"]? content_type = @request.content_type
return unless content_type return unless content_type
if content_type.try(&.starts_with?(URL_ENCODED_FORM)) if content_type.try(&.starts_with?(URL_ENCODED_FORM))
@body = parse_part(@request.body) @body = parse_part(@request.body)