Module: Pushpad::Request

Extended by:
Request
Included in:
Request
Defined in:
lib/pushpad/request.rb

Instance Method Summary collapse

Instance Method Details

#get(endpoint, options = {}) ⇒ Object



12
13
14
# File 'lib/pushpad/request.rb', line 12

def get(endpoint, options = {})
  perform(Net::HTTP::Get, endpoint, options)
end

#head(endpoint, options = {}) ⇒ Object



8
9
10
# File 'lib/pushpad/request.rb', line 8

def head(endpoint, options = {})
  perform(Net::HTTP::Head, endpoint, options)
end

#post(endpoint, body, options = {}) ⇒ Object



16
17
18
19
20
# File 'lib/pushpad/request.rb', line 16

def post(endpoint, body, options = {})
  perform(Net::HTTP::Post, endpoint, options) do |request|
    request.body = body
  end
end