diff --git a/src/crest/exceptions.cr b/src/crest/exceptions.cr index 54ee9c38..5cfdae22 100644 --- a/src/crest/exceptions.cr +++ b/src/crest/exceptions.cr @@ -2,17 +2,6 @@ require "./response" module Crest # Hash of HTTP status code => message. - # - # * 1xx: Informational - Request received, continuing process - # * 2xx: Success - The action was successfully received, understood, and - # accepted - # * 3xx: Redirection - Further action must be taken in order to complete the - # request - # * 4xx: Client Error - The request contains bad syntax or cannot be fulfilled - # * 5xx: Server Error - The server failed to fulfill an apparently valid - # request - # - # See http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml STATUSES = {100 => "Continue", 101 => "Switching Protocols", 102 => "Processing", # WebDAV @@ -91,16 +80,17 @@ module Crest # # Hash of HTTP status `code => message`. # - # `1xx`: Informational - Request received, continuing process - # `2xx`: Success - The action was successfully received, understood, and - # accepted - # `3xx`: Redirection - Further action must be taken in order to complete the - # request - # `4xx`: Client Error - The request contains bad syntax or cannot be fulfilled - # `5xx`: Server Error - The server failed to fulfill an apparently valid - # request + # * **1xx**: Informational - Request received, continuing process + # * **2xx**: Success - The action was successfully received, understood, and + # accepted + # * **3xx**: Redirection - Further action must be taken in order to complete the + # request + # * **4xx**: Client Error - The request contains bad syntax or cannot be fulfilled + # * **5xx**: Server Error - The server failed to fulfill an apparently valid + # request # - # See http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml + # See [HTTP Status Code Registry](http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) + # for more Information. class RequestFailed < Exception getter response diff --git a/src/crest/request.cr b/src/crest/request.cr index 4e577031..617c9d02 100644 --- a/src/crest/request.cr +++ b/src/crest/request.cr @@ -18,16 +18,16 @@ module Crest # * `url` # # Optional parameters: - # * `:headers` a hash containing the request headers - # * `:cookies` a hash containing the request cookies - # * `:payload` a hash containing query params or a raw string - # * `:params` a hash that represent query-string separated from the preceding part by a question mark (?) + # * `headers` a hash containing the request headers + # * `cookies` a hash containing the request cookies + # * `payload` a hash containing query params or a raw string + # * `params` a hash that represent query-string separated from the preceding part by a question mark (?) # a sequence of attribute–value pairs separated by a delimiter (&). - # * `:user` and `:password` for basic auth - # * `:p_addr`, `:p_port`, `:p_user`, `:p_pass` for proxy - # * `:max_redirects` maximum number of redirections (default to `10`) - # * `:logging` enable logging (default to `false`) - # * `:logger` set logger (default to `Crest::CommonLogger`) + # * `user` and `password` for basic auth + # * `p_addr`, `p_port`, `p_user`, `p_pass` for proxy + # * `max_redirects` maximum number of redirections (default to `10`) + # * `logging` enable logging (default to `false`) + # * `logger` set logger (default to `Crest::CommonLogger`) class Request @method : String @url : String