Class: Nervion::Get

Inherits:
Object
  • Object
show all
Includes:
Request
Defined in:
lib/nervion/request.rb

Instance Attribute Summary

Attributes included from Request

#oauth_params, #params

Instance Method Summary collapse

Methods included from Request

#host, #initialize, #port, #uri

Instance Method Details

#http_methodObject



62
63
64
# File 'lib/nervion/request.rb', line 62

def http_method
  'GET'
end

#pathObject



50
51
52
53
54
55
56
# File 'lib/nervion/request.rb', line 50

def path
  if params.any?
    "#{super}?#{percent_encode(params)}"
  else
    super
  end
end

#to_sObject



58
59
60
# File 'lib/nervion/request.rb', line 58

def to_s
  "#{request_line}\r\n#{headers.join("\r\n")}\r\n\r\n"
end