class Drip::Request

Constants

VERB_CLASS_MAPPING

Attributes

content_type[R]
http_verb[R]
options[R]
url[R]

Public Class Methods

new(http_verb, url, options = {}, content_type = nil) click to toggle source
# File lib/drip/request.rb, line 16
def initialize(http_verb, url, options = {}, content_type = nil)
  @http_verb = http_verb
  @url = url
  @options = options
  @content_type = content_type
end

Public Instance Methods

body() click to toggle source
# File lib/drip/request.rb, line 27
def body
  return if http_verb == :get

  options.to_json
end
verb_klass() click to toggle source
# File lib/drip/request.rb, line 23
def verb_klass
  VERB_CLASS_MAPPING[http_verb]
end