1
0
Fork 0
mirror of https://github.com/rest-client/rest-client.git synced 2022-11-09 13:49:40 -05:00

adding a to_str and to_i to response for better compatibility

This commit is contained in:
Julien Kirch 2010-03-19 20:30:26 +01:00
parent 49420a0a48
commit 38952b38b7
2 changed files with 8 additions and 0 deletions

View file

@ -63,6 +63,10 @@ module RestClient
end
end
def to_i
code
end
def inspect
"#{code} #{STATUSES[code]} | #{(headers[:content_type] || '').gsub(/;.*$/, '')} #{size} bytes\n"
end

View file

@ -38,6 +38,10 @@ module RestClient
body.to_s
end
def to_str
body.to_str
end
def size
body.size
end