Class: Hanami::Middleware::BodyParser::FormParser Private
- Defined in:
- lib/hanami/middleware/body_parser/form_parser.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- MIME_TYPES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
[ "multipart/form-data" ].freeze
Constants inherited from Parser
Instance Attribute Summary
Attributes inherited from Parser
Class Method Summary collapse
- .mime_types ⇒ Object private
Instance Method Summary collapse
-
#parse(env) ⇒ Hash
private
Parse a multipart body payload (form file uploading).
Methods inherited from Parser
Constructor Details
This class inherits a constructor from Hanami::Middleware::BodyParser::Parser
Class Method Details
.mime_types ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/hanami/middleware/body_parser/form_parser.rb', line 20 def self.mime_types MIME_TYPES end |
Instance Method Details
#parse(env) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Parse a multipart body payload (form file uploading)
32 33 34 35 36 |
# File 'lib/hanami/middleware/body_parser/form_parser.rb', line 32 def parse(*, env) ::Rack::Multipart.parse_multipart(env) rescue StandardError => exception raise BodyParsingError.new(exception.) end |