Module: HTTPX::Plugins::Multipart
- Defined in:
- lib/httpx/plugins/multipart.rb
Overview
This plugin adds support for passing ‘http-form_data` objects (like file objects) as “multipart/form-data”;
HTTPX.post(URL, form: form: { image: HTTP::FormData::File.new("path/to/file")})
Defined Under Namespace
Modules: FormTranscoder
Class Method Summary collapse
Class Method Details
.configure ⇒ Object
51 52 53 |
# File 'lib/httpx/plugins/multipart.rb', line 51 def self.configure(*) Transcoder.register("form", FormTranscoder) end |
.load_dependencies ⇒ Object
47 48 49 |
# File 'lib/httpx/plugins/multipart.rb', line 47 def self.load_dependencies(*) require "http/form_data" end |