sig/response.rbs in httpx-0.18.7 vs sig/response.rbs in httpx-0.19.0
- old
+ new
@@ -17,10 +17,11 @@
attr_reader body: Body
attr_reader version: String
@options: Options
@request: Request
+ @content_type: ContentType
def copy_to: (_ToPath | _Writer destination) -> void
def close: () -> void
def uri: () -> URI::Generic
@@ -43,13 +44,19 @@
class Body
include _Reader
include _ToS
include _ToStr
+ @response: Response
+ @headers: Headers
+ @options: Options
@state: :idle | :memory | :buffer | :closed
@threshold_size: Integer
@window_size: Integer
+ @encoding: String
+ @length: Integer
+ @buffer: StringIO | Tempfile | nil
def write:(String chunk) -> Integer?
def each: () { (String) -> void } -> void
| () -> Enumerable[String]
@@ -63,33 +70,36 @@
private
def initialize: (Response, Options) -> untyped
def rewind: () -> void
def transition: () -> void
+ def _with_same_buffer_pos: [A] () { () -> A } -> A
end
end
class ContentType
MIME_TYPE_RE: Regexp
CHARSET_RE: Regexp
- attr_reader mime_type: String?
- attr_reader charset: String?
+ @header_value: String?
+ @mime_type: String?
+ @charset: String?
- def self.parse: (_ToS) -> ContentType
- def self.mime_type: (_ToS) -> String?
- def self.charset: (_ToS) -> String?
+ def mime_type: () -> String?
+ def charset: () -> String?
+
private
def initialize: (String? header_value) -> void
end
class ErrorResponse
include _Response
include Loggable
@options: Options
+ @error: Exception
attr_reader request: Request
def status: () -> (Integer | _ToS)
\ No newline at end of file