Method: ADN::API.construct_request

Defined in:
lib/adn/api.rb

.construct_request(verb, url) ⇒ Object



21
22
23
24
25
26
27
28
29
# File 'lib/adn/api.rb', line 21

def construct_request(verb, url)
  http_method = case verb
    when :post then Net::HTTP::Post
    when :put then Net::HTTP::Put
    when :delete then Net::HTTP::Delete
    else Net::HTTP::Get
  end
  http_method.new(url)
end