module Occi::Api::Client::Http::CodeHelpers
Constants
- HTTP_CODES
hash mapping HTTP response codes to human-readable messages
Public Instance Methods
reason_phrase(code)
click to toggle source
Converts HTTP response codes to human-readable phrases.
@example
reason_phrase(500) # => "Internal Server Error"
@param code [Integer] HTTP response code @return [String] human-readable phrase
# File lib/occi/api/client/http/code_helpers.rb, line 57 def reason_phrase(code) HTTP_CODES[code.to_s] end