httpx/lib/httpx/transcoder/multipart.rb
HoneyryderChuck 3f73d2e3ce multipart supported by default
the plugin was now moved to the transcoder layer, where it is available
from the get-go.
2023-09-20 17:57:41 +01:00

18 lines
464 B
Ruby

# frozen_string_literal: true
require_relative "multipart/encoder"
require_relative "multipart/decoder"
require_relative "multipart/part"
require_relative "multipart/mime_type_detector"
module HTTPX::Transcoder
module Multipart
MULTIPART_VALUE_COND = lambda do |value|
value.respond_to?(:read) ||
(value.respond_to?(:to_hash) &&
value.key?(:body) &&
(value.key?(:filename) || value.key?(:content_type)))
end
end
end