2021-07-15 15:53:15 +01:00

26 lines
615 B
Plaintext

module HTTPX
module Plugins::Cookies
class Jar
type cookie = Cookie | Array[[String, String, cookie_attributes]] | Array[[String, String]] | cookie_attributes
include Enumerable[Cookie]
@cookies: Array[Cookie]
def parse: (String set_cookie) -> void
def add: (Cookie name, ?String path) -> void
def []: (uri) -> Array[Cookie]
def each: (?uri) { (Cookie) -> void } -> void
| (?uri) -> Enumerable[Cookie]
def merge: (_Each[cookie] cookies) -> instance
private
def initialize: (?_Each[cookie] cookies) -> untyped
end
end
end