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"

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.parse(args) #

[View source]

Instance Method Detail

def basic_auth : {String, String}? #

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

[View source]
def body : String? #

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

[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::Format #

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

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

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

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

[View source]
def help? : Bool? #

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

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

[View source]
def parser #

def parser=(parser : Nil | OptionParser) #

[View source]
def parser? : OptionParser? #

def url #

def url=(url : Nil | URI) #

[View source]
def url? : URI? #

def version=(version : Bool | Nil) #

[View source]
def version? : Bool? #

[View source]