Skip to content

Commit

Permalink
Merge pull request #15 from ninoseki/add-timeout-setting
Browse files Browse the repository at this point in the history
chore: add HTTP timeout setting
  • Loading branch information
ninoseki committed Sep 21, 2018
2 parents ab7d6c0 + bd3f1cb commit 43b5847
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/miteru/http_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def self.download(url, base_dir = "/tmp")
end

def get(url)
HTTP.headers(default_headers).get(url, default_options)
HTTP.timeout(write: 2, connect: 5, read: 10).headers(default_headers).get(url, default_options)
end

def self.get(url)
Expand Down

0 comments on commit 43b5847

Please sign in to comment.