![]() These will hopefully be cleaned up in a future major RestClient handles a few specific error cases separately in order to giveīetter error messages. RestClient will propagate up exceptions like socket errors without modification: > RestClient.get ' Exception: Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 12345 Have been kept for backwards compatibility. ![]() RestClient::ExceptionWithResponse, there are a few quirky exceptions that While most exceptions have been collected under RestClient::RequestFailed aka Rescue RestClient::ExceptionWithResponse => e response on the exception to get the server's responseĮxception: RestClient::NotFound: 404 Not Found for other cases, a RestClient::ExceptionWithResponse holding the Response will be raised a specific exception class will be thrown for known error codes.for result code 303, the redirection will be followed and the request transformed into a GET.for result codes 301, 302 or 307, the redirection will be followed if the request is a GET or a HEAD.for result codes between 200 and 207, a RestClient::Response will be returned.See RestClient::Resource docs for details. Usage: Resource Nesting site = RestClient :: Resource. See RestClient::Resource module docs for details. read ( ' pic.jpg ' ), :content_type => ' image/jpg ' new ' ', ' user ', ' pass ' private_resource. get private_resource = RestClient :: Resource. ![]() get ( url, headers = Usage: ActiveResource-Style resource = RestClient :: Resource. Usage: Raw URLīasic usage: require ' rest-client ' RestClient. See history.md for a more complete description of changes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |