class QUIC::Client

Defined in:

lsquic/client.cr

Constant Summary

ENGINE_FLAGS = LibLsquic::LSENG_HTTP
REQUIRED_HEADERS = {":method", ":scheme", ":path", ":authority"}

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(host : String, port = nil, tls : Bool | OpenSSL::SSL::Context::Client = false) #

[View source]
def self.new(uri : URI, tls = nil) #

[View source]
def self.new(uri : URI, tls = nil, &) #

[View source]
def self.new(host : String, port = nil, tls = false, &) #

[View source]

Class Method Detail

def self.delete(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil) : HTTP::Client::Response #

[View source]
def self.delete(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil, &) #

[View source]
def self.delete(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash) : HTTP::Client::Response #

[View source]
def self.delete(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash, &) #

[View source]
def self.ea_packets_out(peer_ctx : Pointer(Void), specs : Pointer(LibLsquic::OutSpec), count : LibC::UInt) #

[View source]
def self.exec(method, url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil) : HTTP::Client::Response #

[View source]
def self.exec(method, url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil, &) #

[View source]
def self.get(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil) : HTTP::Client::Response #

[View source]
def self.get(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil, &) #

[View source]
def self.get(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash) : HTTP::Client::Response #

[View source]
def self.get(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash, &) #

[View source]
def self.head(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil) : HTTP::Client::Response #

[View source]
def self.head(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil, &) #

[View source]
def self.head(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash) : HTTP::Client::Response #

[View source]
def self.head(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash, &) #

[View source]
def self.on_close(s : LibLsquic::StreamT, stream_if_ctx : Pointer(Void)) #

[View source]
def self.on_conn_closed(c : LibLsquic::ConnT) #

[View source]
def self.on_new_conn(stream_if_ctx : Pointer(Void), c : LibLsquic::ConnT) #

[View source]
def self.on_new_stream(stream_if_ctx : Pointer(Void), s : LibLsquic::StreamT) #

[View source]
def self.on_read(s : LibLsquic::StreamT, stream_if_ctx : Pointer(Void)) #

[View source]
def self.on_write(s : LibLsquic::StreamT, stream_if_ctx : Pointer(Void)) #

[View source]
def self.options(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil) : HTTP::Client::Response #

[View source]
def self.options(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil, &) #

[View source]
def self.options(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash) : HTTP::Client::Response #

[View source]
def self.options(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash, &) #

[View source]
def self.patch(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil) : HTTP::Client::Response #

[View source]
def self.patch(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil, &) #

[View source]
def self.patch(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash) : HTTP::Client::Response #

[View source]
def self.patch(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash, &) #

[View source]
def self.post(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil) : HTTP::Client::Response #

[View source]
def self.post(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil, &) #

[View source]
def self.post(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash) : HTTP::Client::Response #

[View source]
def self.post(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash, &) #

[View source]
def self.put(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil) : HTTP::Client::Response #

[View source]
def self.put(url : String | URI, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, tls = nil, &) #

[View source]
def self.put(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash) : HTTP::Client::Response #

[View source]
def self.put(url, headers : HTTP::Headers | Nil = nil, tls = nil, *, form : String | IO | Hash, &) #

[View source]
def self.stream_readf(stream_if_ctx : Pointer(Void), buf : Pointer(UInt8), buf_len : LibC::SizeT, fin : LibC::Int) #

[View source]

Instance Method Detail

def basic_auth(username, password) #

Configures this client to perform basic authentication in every request.


[View source]
def before_request(&callback : HTTP::Request -> ) #

[View source]
def client_process_conns(engine) #

[View source]
def close #

[View source]
def connect_timeout=(connect_timeout : Number) #

[View source]
def connect_timeout=(connect_timeout : Time::Span) #

[View source]
def delete(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil) : HTTP::Client::Response #

[View source]
def delete(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, &) #

[View source]
def delete(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO) : HTTP::Client::Response #

[View source]
def delete(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO, &) #

[View source]
def delete(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple) : HTTP::Client::Response #

[View source]
def delete(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple, &) #

[View source]
def dns_timeout=(dns_timeout : Number) #

[View source]
def dns_timeout=(dns_timeout : Time::Span) #

[View source]
def exec(method : String, path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil) : HTTP::Client::Response #

[View source]
def exec(request : HTTP::Request) : HTTP::Client::Response #

[View source]
def exec(method : String, path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, &) #

[View source]
def exec(request : HTTP::Request, &) #

[View source]
def family : Socket::Family #

[View source]
def family=(family : Socket::Family) #

[View source]
def get(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil) : HTTP::Client::Response #

[View source]
def get(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, &) #

[View source]
def get(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO) : HTTP::Client::Response #

[View source]
def get(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO, &) #

[View source]
def get(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple) : HTTP::Client::Response #

[View source]
def get(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple, &) #

[View source]
def head(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil) : HTTP::Client::Response #

[View source]
def head(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, &) #

[View source]
def head(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO) : HTTP::Client::Response #

[View source]
def head(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO, &) #

[View source]
def head(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple) : HTTP::Client::Response #

[View source]
def head(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple, &) #

[View source]
def host : String #

[View source]
def options(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil) : HTTP::Client::Response #

[View source]
def options(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, &) #

[View source]
def options(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO) : HTTP::Client::Response #

[View source]
def options(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO, &) #

[View source]
def options(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple) : HTTP::Client::Response #

[View source]
def options(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple, &) #

[View source]
def patch(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil) : HTTP::Client::Response #

[View source]
def patch(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, &) #

[View source]
def patch(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO) : HTTP::Client::Response #

[View source]
def patch(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO, &) #

[View source]
def patch(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple) : HTTP::Client::Response #

[View source]
def patch(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple, &) #

[View source]
def port : Int32 #

[View source]
def post(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil) : HTTP::Client::Response #

[View source]
def post(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, &) #

[View source]
def post(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO) : HTTP::Client::Response #

[View source]
def post(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO, &) #

[View source]
def post(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple) : HTTP::Client::Response #

[View source]
def post(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple, &) #

[View source]
def put(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil) : HTTP::Client::Response #

[View source]
def put(path, headers : HTTP::Headers | Nil = nil, body : BodyType = nil, &) #

[View source]
def put(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO) : HTTP::Client::Response #

[View source]
def put(path, headers : HTTP::Headers | Nil = nil, *, form : String | IO, &) #

[View source]
def put(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple) : HTTP::Client::Response #

[View source]
def put(path, headers : HTTP::Headers | Nil = nil, *, form : Hash(String, String) | NamedTuple, &) #

[View source]
def read_timeout=(read_timeout : Number) #

[View source]
def read_timeout=(read_timeout : Time::Span) #

[View source]
def run_engine #

[View source]
def socket : UDPSocket #

[View source]
def tls : OpenSSL::SSL::Context::Client #

[View source]
def tls? : OpenSSL::SSL::Context::Client | Nil #

[View source]