module Halite::Chainable

Defined in:

lib/halite/src/halite/chainable.cr
lib/stripetease/src/stripetease/extensions/chainable.cr
cisco/webex/extensions/chainable.cr

Instance Method Summary

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")

[View source]
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")

[View source]