You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API to allow callbacks based on the HTTP status code of a response. Should support ranges. Tentatively something like
'http://ooga.com/foo'.to_uri(:on_respose_code => {
401 => lambda {|response| raise UnauthorizedException},
500..599 => lambda do |response|
Wrest.logger.error response.body
raise ServerDiedException
end
}
).get.deserialise
API to allow callbacks based on the HTTP status code of a response. Should support ranges. Tentatively something like
'http://ooga.com/foo'.to_uri(:on_respose_code => {
401 => lambda {|response| raise UnauthorizedException},
500..599 => lambda do |response|
Wrest.logger.error response.body
raise ServerDiedException
end
}
).get.deserialise
This is closely related to feature request #49.
The text was updated successfully, but these errors were encountered: