Sha256: 846473635c288af74d4ba3c5453569577a1658f95c1f79780e420d8acd087709
Contents?: true
Size: 523 Bytes
Versions: 6
Compression:
Stored size: 523 Bytes
Contents
module Twurl class RequestController < AbstractCommandController NO_URI_MESSAGE = "No URI specified" def dispatch if client.needs_to_authorize? raise Exception, "You need to authorize first." end options.path ||= OAuthClient.rcfile.alias_from_options(options) perform_request end def perform_request response = client.perform_request_from_options(options) CLI.print response.body rescue URI::InvalidURIError CLI.puts NO_URI_MESSAGE end end end
Version data entries
6 entries across 6 versions & 1 rubygems