Module: Pushpad::Request

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

Instance Method Summary collapse

Instance Method Details

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



28
29
30
# File 'lib/pushpad/request.rb', line 28

def delete(endpoint, options = {})
  perform(Net::HTTP::Delete, endpoint, options)
end

#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

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



22
23
24
25
26
# File 'lib/pushpad/request.rb', line 22

def patch(endpoint, body, options = {})
  perform(Net::HTTP::Patch, endpoint, options) do |request|
    request.body = body
  end
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