Class Net::HTTPResponse
In: lib/s33r/s33r_http.rb
Parent: Object

Addtions to the Net::HTTP classes

Adds some convenience functions for checking response status.

Methods

Attributes

body  [W] 
success  [RW] 

Public Instance methods

[Source]

    # File lib/s33r/s33r_http.rb, line 11
11:   def check_s3_availability
12:     if (500..503).include? code.to_i
13:       raise S33r::S33rException::S3FallenOver, "S3 has fallen over! (got a #{code} code in response)"
14:     end
15:   end

[Source]

    # File lib/s33r/s33r_http.rb, line 25
25:   def not_found
26:     code = '404'
27:   end

[Source]

    # File lib/s33r/s33r_http.rb, line 17
17:   def ok?
18:     success
19:   end

[Source]

    # File lib/s33r/s33r_http.rb, line 21
21:   def success
22:     code == '200'
23:   end

[Source]

    # File lib/s33r/s33r_http.rb, line 29
29:   def to_s
30:     body
31:   end

[Validate]