lib/httpx/plugins/multipart.rb in httpx-0.22.5 vs lib/httpx/plugins/multipart.rb in httpx-0.23.0
- old
+ new
@@ -38,12 +38,24 @@
require "httpx/plugins/multipart/encoder"
require "httpx/plugins/multipart/decoder"
require "httpx/plugins/multipart/part"
require "httpx/plugins/multipart/mime_type_detector"
end
+ end
- def configure(*)
- Transcoder.register("form", FormTranscoder)
+ module RequestBodyMethods
+ private
+
+ def initialize_body(options)
+ return FormTranscoder.encode(options.form) if options.form
+
+ super
+ end
+ end
+
+ module ResponseMethods
+ def form
+ decode(FormTranscoder)
end
end
module FormTranscoder
module_function