class Crul::Options

Defined in:

options.cr

Constant Summary

USAGE = " Usage: crul [method] URL [options]\n\n HTTP methods (default: GET):\n get, GET Use GET\n post, POST Use POST\n put, PUT Use PUT\n delete, DELETE Use DELETE\n\n HTTP options:\n -d DATA, --data DATA Request body\n -d @file, --data @file Request body (read from file)\n -H HEADER, --header HEADER Set header\n -a USER:PASS, --auth USER:PASS Basic auth\n -c FILE, --cookies FILE Use FILE as cookie store (reads and writes)\n\n Response formats (default: autodetect):\n -j, --json Format response as JSON\n -x, --xml Format response as XML\n -p, --plain Format response as plain text\n\n Other options:\n -h, --help Show this help\n -V, --version Display version"

Class Method Summary

Instance Method Summary

Class Method Detail

def self.parse(args : Array(String)) #

[View source]

Instance Method Detail

def basic_auth : Tuple(String, String) | Nil #

[View source]
def basic_auth=(basic_auth : Tuple(String, String) | Nil) #

[View source]
def body : String | Nil #

[View source]
def body=(body : String | Nil) #

[View source]
def cookie_store : Crul::CookieStore #

[View source]
def cookie_store=(cookie_store : Crul::CookieStore) #

[View source]
def errors : Array(Exception) #

[View source]
def errors=(errors : Array(Exception)) #

[View source]
def format : Crul::Formats #

[View source]
def format=(format : Crul::Formats) #

[View source]
def headers : HTTP::Headers #

[View source]
def headers=(headers : HTTP::Headers) #

[View source]
def help=(help : Bool) #

[View source]
def help? : Bool #

[View source]
def method : Crul::Methods #

[View source]
def method=(method : Crul::Methods) #

[View source]
def parser : OptionParser | Nil #

def parser=(parser : OptionParser | Nil) #

[View source]
def parser? : OptionParser | Nil | Nil #

def url : URI #

def url=(url : URI) #

[View source]
def url? : URI | Nil #

def version=(version : Bool) #

[View source]
def version? : Bool #

[View source]