Crul::Options
Inherits Reference / Object
Constants
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
new
Class methods
parse(args)
Instance methods
basic_auth
basic_auth=(basic_auth : Tuple(String, String) | Nil)
body
body=(body : Nil | String)
cookie_store
cookie_store=(cookie_store : Crul::CookieStore)
errors
errors=(errors : Array(Exception))
format
format=(format : Crul::Format)
headers
headers=(headers : HTTP::Headers)
help=(help : Bool | Nil)
help?
method
method=(method : Crul::Methods)
parser
parser=(parser : Nil | OptionParser)
parser?
url
url=(url : Nil | URI)
url?
version=(version : Bool | Nil)
version?