class Cossack::Client

Defined in:

cossack/client.cr

Constant Summary

USER_AGENT = "Cossack v#{VERSION}"

Constructors

Instance Method Summary

Constructor Detail

def self.new(base_url = nil, &) #

[View source]
def self.new(base_url = nil) #

When block is not given.


[View source]

Instance Method Detail

def base_uri : URI #

[View source]
def call(request : Request) : Response #

[View source]

[View source]
def connection=(conn : Proc(Request, Response) | Connection) #

[View source]
def delete(url : String, params : Params | Nil = nil) : Response #

[View source]
def delete(url : String, params : Params | Nil = nil, &) : Response #

[View source]
def get(url : String, params : Params | Nil = nil) : Response #

[View source]
def get(url : String, params : Params | Nil = nil, &) : Response #

[View source]
def head(url : String, params : Params | Nil = nil) : Response #

[View source]
def head(url : String, params : Params | Nil = nil, &) : Response #

[View source]
def headers : HTTP::Headers #

[View source]
def options(url : String, params : Params | Nil = nil) : Response #

[View source]
def options(url : String, params : Params | Nil = nil, &) : Response #

[View source]
def patch(url : String, body : String = "") #

[View source]
def patch(url : String, body : String = "", &) #

[View source]
def post(url : String, body : String = "") #

[View source]
def post(url : String, body : String = "", &) #

[View source]
def put(url : String, body : String = "") #

[View source]
def put(url : String, body : String = "", &) #

[View source]
def request_options : Cossack::RequestOptions #

[View source]
def use(middleware_class, *args, **nargs) #

[View source]