class Cossack::Client
- Cossack::Client
- Reference
- Object
Defined in:
cossack/client.crConstant Summary
-
USER_AGENT =
"Cossack v#{VERSION}"
Constructors
- .new(base_url = nil, &)
-
.new(base_url = nil)
When block is not given.
Instance Method Summary
- #base_uri : URI
- #call(request : Request) : Response
- #connection : Cossack::Connection | Cossack::Request -> Cossack::Response
- #connection=(conn : Proc(Request, Response) | Connection)
- #delete(url : String, params : Params | Nil = nil) : Response
- #delete(url : String, params : Params | Nil = nil, &) : Response
- #get(url : String, params : Params | Nil = nil) : Response
- #get(url : String, params : Params | Nil = nil, &) : Response
- #head(url : String, params : Params | Nil = nil) : Response
- #head(url : String, params : Params | Nil = nil, &) : Response
- #headers : HTTP::Headers
- #options(url : String, params : Params | Nil = nil) : Response
- #options(url : String, params : Params | Nil = nil, &) : Response
- #patch(url : String, body : String = "")
- #patch(url : String, body : String = "", &)
- #post(url : String, body : String = "")
- #post(url : String, body : String = "", &)
- #put(url : String, body : String = "")
- #put(url : String, body : String = "", &)
- #request_options : Cossack::RequestOptions
- #use(middleware_class, *args, **nargs)