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")})

gitlab.com/honeyryderchuck/httpx/wikis/Multipart-Uploads

Defined Under Namespace

Modules: FormTranscoder

Class Method Summary collapse

Class Method Details

.configureObject



51
52
53
# File 'lib/httpx/plugins/multipart.rb', line 51

def self.configure(*)
  Transcoder.register("form", FormTranscoder)
end

.load_dependenciesObject



47
48
49
# File 'lib/httpx/plugins/multipart.rb', line 47

def self.load_dependencies(*)
  require "http/form_data"
end