Skip to content

Commit

Permalink
Always outputs HTTP status code now.
Browse files Browse the repository at this point in the history
  • Loading branch information
FiXato committed Aug 20, 2008
1 parent 9f7bae2 commit c6e5fc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rest_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def setup_credentials(req)
end

def process_result(res)
puts "HTTP status code: #{res.code}\n"
if %w(200 201 202).include? res.code
decode res['content-encoding'], res.body
elsif %w(301 302 303).include? res.code
Expand All @@ -186,7 +187,6 @@ def process_result(res)
raise ResourceNotFound
elsif res.code == "422"
puts "Unprocessable Entity"
puts "HTTP status code #{res.code}\n"
puts res.body
res
else
Expand Down

0 comments on commit c6e5fc3

Please sign in to comment.