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:
parent
49420a0a48
commit
38952b38b7
2 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -38,6 +38,10 @@ module RestClient
|
|||
body.to_s
|
||||
end
|
||||
|
||||
def to_str
|
||||
body.to_str
|
||||
end
|
||||
|
||||
def size
|
||||
body.size
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue