Crest::Response
Response objects have several useful methods:
body: The response body as aStringbody_io: The response body as aIOstatus: The response status as aHTTP::Statusstatus_code: The HTTP response codeheaders: A hash of HTTP response headerscookies: A hash of HTTP cookies set by the serverrequest: TheCrest::Requestobject used to make the requesthttp_client_res: TheHTTP::Client::Responseobjecthistory: A list of each response received in a redirection chain
Constructors
Instance methods
body(*args, **options)
Sourcebody(*args, **options, &)
Sourcebody_io(*args, **options)
Sourcebody_io(*args, **options, &)
Sourceclient_error?(*args, **options)
Sourceclient_error?(*args, **options, &)
Sourcecookies
Sourceheaders
Sourcehistory
Sourcehttp_client_res
Sourceinformational?(*args, **options)
Sourceinformational?(*args, **options, &)
Sourceinspect
Returns an unambiguous and information-rich string representation of this object, typically intended for developers.
This method should usually not be overridden. It delegates to
#inspect(IO) which can be overridden for custom implementations.
Also see #to_s.
invalid?
Sourceredirect?
Sourceredirection?(*args, **options)
Sourceredirection?(*args, **options, &)
Sourcerequest
Sourcereturn!
Sourcereturn!
Sourceserver_error?(*args, **options)
Sourceserver_error?(*args, **options, &)
Sourcestatus(*args, **options)
Sourcestatus(*args, **options, &)
Sourcestatus_code(*args, **options)
Sourcestatus_code(*args, **options, &)
Sourcesuccess?(*args, **options)
Sourcesuccess?(*args, **options, &)
Sourceto_curl(*args, **options)
Sourceto_curl(*args, **options, &)
SourceAppends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
url
Source