Sha256: 2a1225464e6c688914644c207468cfe8819ca8a840b63d216957dcb7af871126

Contents?: true

Size: 1.42 KB

Versions: 10

Compression:

Stored size: 1.42 KB

Contents

module HTTPX
  module Plugins
    module Multipart
      def self.load_dependencies: (singleton(Session)) -> void
      def self.configure: (*untyped) -> void
      def self?.encode: (untyped) -> (Encoder | Transcoder::Form::Encoder)

      type multipart_value = string | Pathname | File | _Reader

      type record_multipart_value = multipart_value |
                                    { content_type: String, filename: String, body: multipart_value } |
                                    { content_type: String, body: multipart_value }

      type multipart_nested_value = multipart_value | _ToAry[multipart_value] | _ToHash[string, multipart_value]

      type multipart_input = Enumerable[[string, multipart_value], untyped]

      class Encoder
        include Transcoder::_Encoder
        include _Reader

        def content_type: () -> String

        private

        def initialize: (Hash[Symbol | string, multipart_nested_value] multipart_data) -> untyped

        def header_part: (string key, String content_type, String? filename) -> StringIO

        def read_chunks: (String buffer, Integer? length) -> void

        def read_from_part: (Integer? max_length) -> void
      end

      module Part
        def self?.call: (multipart_nested_value) -> ([_Reader, String, String?] | [_Reader, String])
      end

      module MimeTypeDetector
        def self?.call: (IO file, ?String filename) -> String?
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
httpx-0.14.1 sig/plugins/multipart.rbs
httpx-0.14.0 sig/plugins/multipart.rbs
httpx-0.13.2 sig/plugins/multipart.rbs
httpx-0.13.1 sig/plugins/multipart.rbs
httpx-0.13.0 sig/plugins/multipart.rbs
httpx-0.12.0 sig/plugins/multipart.rbs
httpx-0.11.3 sig/plugins/multipart.rbs
httpx-0.11.2 sig/plugins/multipart.rbs
httpx-0.11.1 sig/plugins/multipart.rbs
httpx-0.11.0 sig/plugins/multipart.rbs