mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-12-04 00:01:13 -05:00
48 lines
1.0 KiB
Plaintext
48 lines
1.0 KiB
Plaintext
module HTTPX
|
|
module Plugins::Cookies
|
|
type cookie_attributes = Hash[Symbol | String, top]
|
|
|
|
class Cookie
|
|
include Comparable
|
|
|
|
MAX_LENGTH: Integer
|
|
|
|
attr_reader domain: DomainName?
|
|
|
|
attr_reader path: String
|
|
|
|
attr_reader name: String
|
|
|
|
attr_reader value: String?
|
|
|
|
attr_reader created_at: Time
|
|
|
|
def path=: (string) -> void
|
|
|
|
def domain=: (string) -> void
|
|
|
|
def expires: () -> Time?
|
|
|
|
def expired?: () -> bool
|
|
| (Time) -> bool
|
|
|
|
def cookie_value: () -> String
|
|
alias to_s cookie_value
|
|
|
|
def valid_for_uri?: (uri) -> bool
|
|
|
|
def self.new: (Cookie) -> instance
|
|
| (cookie_attributes) -> instance
|
|
| (_ToS, _ToS, ?cookie_attributes) -> instance
|
|
|
|
def self.path_match?: (String, String) -> bool
|
|
|
|
private
|
|
|
|
def initialize: (cookie_attributes) -> untyped
|
|
| (_ToS, _ToS, ?cookie_attributes) -> untyped
|
|
|
|
def acceptable_from_uri?: (uri) -> bool
|
|
end
|
|
end
|
|
end |