module Halite::Chainable
Defined in:
lib/halite/src/halite/chainable.crlib/stripetease/src/stripetease/extensions/chainable.cr
cisco/webex/extensions/chainable.cr
Instance Method Summary
-
#cookies(cookies : Hash(String, _) | NamedTuple) : Halite::Client
Make a request with the given cookies
-
#headers(headers : Hash(String, _) | NamedTuple) : Halite::Client
Make a request with the given headers
Instance Method Detail
def cookies(cookies : Hash(String, _) | NamedTuple) : Halite::Client
#
Make a request with the given cookies
Halite.cookies({"private-token", "6abaef100b77808ceb7fe26a3bcff1d0"})
.get("http://httpbin.org/get")
# Or
Halite.cookies({private-token: "6abaef100b77808ceb7fe26a3bcff1d0"})
.get("http://httpbin.org/get")
def headers(headers : Hash(String, _) | NamedTuple) : Halite::Client
#
Make a request with the given headers
Halite.headers({"Content-Type", "application/json", "Connection": "keep-alive"})
.get("http://httpbin.org/get")
# Or
Halite.headers({content_type: "application/json", connection: "keep-alive"})
.get("http://httpbin.org/get")