module Crest

Overview

This module's static methods are the entry point for using the Crest client.

Supported HTTP methods: get, put, post, patch delete, options, head

Examples:

Crest.get(
  "http://httpbin.org/get",
  headers: {"Content-Type" => "image/jpg"},
  params: {"lang" => "en"}
)

Crest.post(
  "http://httpbin.org/post",
  headers: {"Access-Token" => ["secret1", "secret2"]},
  form: {"fizz" => "buz"},
  logging: true,
)

Crest.get("http://httpbin.org/stream/5") do |response|
  while line = response.body_io.gets
    puts line
  end
end

Defined in:

lib/crest/src/crest.cr
lib/crest/src/crest/curlify.cr
lib/crest/src/crest/exceptions.cr
lib/crest/src/crest/form.cr
lib/crest/src/crest/forms/data_form.cr
lib/crest/src/crest/forms/json_form.cr
lib/crest/src/crest/forms/urlencoded_form.cr
lib/crest/src/crest/logger.cr
lib/crest/src/crest/loggers/common_logger.cr
lib/crest/src/crest/params_decoder.cr
lib/crest/src/crest/params_encoder.cr
lib/crest/src/crest/params_encoders/enumerated_flat_params_encoder.cr
lib/crest/src/crest/params_encoders/flat_params_encoder.cr
lib/crest/src/crest/params_encoders/nested_params_encoder.cr
lib/crest/src/crest/params_encoders/zero_enumerated_flat_params_encoder.cr
lib/crest/src/crest/redirector.cr
lib/crest/src/crest/request.cr
lib/crest/src/crest/resource.cr
lib/crest/src/crest/response.cr
ext/crest.cr