Sha256: 18567c4bbe963b8eaa73e03568a2baf90222b25d4c2395fd443f7673b97b8998
Contents?: true
Size: 450 Bytes
Versions: 38
Compression:
Stored size: 450 Bytes
Contents
#!/usr/bin/env ruby require 'dagger' method = ARGV[0] or abort "Usage: dagger [method] [url] [data]" method = if ARGV[1].nil? 'get' else ARGV.shift end def parse_data(str) {} # not ready yet. TODO! end url = ARGV[0] data = parse_data(ARGV[1]) options = { :follow => true } # puts "#{method} #{url}" resp = Dagger.send(method, url, data, options) if ARGV.include?('-I') puts resp.status puts resp.headers else puts resp.body end
Version data entries
38 entries across 38 versions & 1 rubygems