![]() 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. default request headers: rest-client sets Accept: */* and.To disable proxies set by environment variables improved proxy support with per-request proxy configuration, plus the ability.HTTP params: handling of GET/POST params is more consistent and sophisticatedįor deeply nested hash objects, and ParamsArray can be used to pass ordered.encoding: Content-Type charset response headers are used to automatically set.major changes to cookie support: cookie jars are used for browser-like.improvements to handling of redirects: responses and history are properly.cleanup of exception classes, including new RestClient::Exceptions::Timeout.And #body or #to_s return a true String object. RestClient::Response objects are a subclass of String rather than aįrankenstein monster.Largely compatible, so many applications will be able to upgrade with no Users are encouraged to upgrade to rest-client 2.0, which cleans up a number ofĪPI warts and wrinkles, making rest-client generally more useful. It's recommended to useīundler to manage these dependencies for hacking on There are also several development dependencies. The rest-client gem depends on these other gems for usage at runtime: Versions no longer have any official support, and do not receive security Alternative interpreters compatible withĮarlier Ruby versions such as 1.8.7, 1.9.2, and 1.9.3 are no longer supported. Imported into the new list archives as well. The old archives are still up, but have been The old Librelist mailing list is defunct, as Librelist appears to be brokenĪnd not accepting new mail. We have a new email list for announcements, hosted by Groups.io. Of specifying actions: get, put, post, delete. REST Client - simple DSL for accessing HTTP and REST resourcesĪ simple HTTP and REST client for Ruby, inspired by the Sinatra's microframework style
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |