lib/yt/request.rb
# Returns the +cURL+ version of the request, useful to re-run the request
# in a shell terminal.
# @return [String] the +cURL+ version of the request.
Returns the +cURL+ version of the request, useful to re-run the request
in a shell terminal.
Returns the + cURL + version of the request useful to re - run the request in a shell terminal .
def as_curl
      'curl'.tap do |curl|
        curl << " -X #{http_request.method}"
        http_request.each_header{|k, v| curl << %Q{ -H "#{k}: #{v}"}}
        curl << %Q{ -d '#{http_request.body}'} if http_request.body
        curl << %Q{ "#{uri.to_s}"}
      end
    end
def as_curl 'curl' . tap do | curl | curl << " -X #{http_request.method}" http_request . each_header { | k , v | curl << %Q{ -H "#{k}: #{v}"} } curl << %Q{ -d '#{http_request.body}'} if http_request . body curl << %Q{ "#{uri.to_s}"} end end
Returns the +cURL+ version of the request, useful to re-run the request
in a shell terminal.
Returns the + cURL + version of the request useful to re - run the request in a shell terminal .
the +cURL+ version of the request.
the + cURL + version of the request .
String