Sha256: 63e98b72e3c66d951fd7056a205fdb24b69ce37325ed56f1c470a29e8d379150

Contents?: true

Size: 387 Bytes

Versions: 26

Compression:

Stored size: 387 Bytes

Contents

#!/usr/bin/env ruby

require 'net/http'

$running = true

trap('INT') { $running = false }

STDIN.each do |line|

  break unless $running

  begin

    uri = URI(line.chomp)
    start = Time.now.to_f
    res = Net::HTTP.get_response(uri)
    finish = Time.now.to_f
    bench = (finish - start)
    puts "#{res.code} #{uri}"
  rescue => e
    puts "ERROR: #{e.message} #{uri}"
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
ix-cli-0.0.27 bin/ix-url-check
ix-cli-0.0.26 bin/ix-url-check
ix-cli-0.0.25 bin/ix-url-check
ix-cli-0.0.24 bin/ix-url-check
ix-cli-0.0.23 bin/ix-url-check
ix-cli-0.0.22 bin/ix-url-check
ix-cli-0.0.21 bin/ix-url-check
ix-cli-0.0.20 bin/ix-url-check
ix-cli-0.0.19 bin/ix-url-check
ix-cli-0.0.18 bin/ix-url-check
ix-cli-0.0.17 bin/ix-url-check
ix-cli-0.0.16 bin/ix-url-check
ix-cli-0.0.15 bin/ix-url-check
ix-cli-0.0.14 bin/ix-url-check
ix-cli-0.0.13 bin/ix-url-check
ix-cli-0.0.12 bin/ix-url-check
ix-cli-0.0.11 bin/ix-url-check
ix-cli-0.0.10 bin/ix-url-check
ix-cli-0.0.9 bin/ix-url-check
ix-cli-0.0.7 bin/ix-url-check