lib/httpx/plugins/multipart.rb in httpx-0.3.1 vs lib/httpx/plugins/multipart.rb in httpx-0.4.0
- old
+ new
@@ -1,8 +1,13 @@
# frozen_string_literal: true
module HTTPX
module Plugins
+ #
+ # 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")})
+ #
module Multipart
module FormTranscoder
module_function
class Encoder