class Crest::Curlify

Overview

Class to convert Crest::Request object to cURL command

request = Crest::Request.new(:post, "http://httpbin.org/post", form: {"title" => "New Title"})
Crest::Curlify.to_curl(request)
=> "curl -X POST http://httpbin.org/post -d 'title=New+Title' -H 'Content-Type: application/x-www-form-urlencoded'"

Defined in:

crest/curlify.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(request : Crest::Request) #

[View source]

Class Method Detail

def self.to_curl(request : Crest::Request) #

Returns string with cURL command by provided Crest::Request object


[View source]

Instance Method Detail

def to_curl #

[View source]