Navigation Menu

Skip to content

Commit

Permalink
Implement --show-response
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 10, 2014
1 parent 699c1cb commit e8c63f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/wikipedia-search.rb
@@ -1,5 +1,6 @@
#!/usr/bin/env ruby

require "pp"
require "pathname"
require "ostruct"
require "optparse"
Expand Down Expand Up @@ -83,6 +84,9 @@ def send_request(query, client, options)
n_hits = 0
end
p [elapsed, query, status_code, n_hits]
if options.show_response
pp response
end
yield
end
end
Expand Down

0 comments on commit e8c63f5

Please sign in to comment.