Module: Pushpad::Request
Instance Method Summary collapse
- #delete(endpoint, options = {}) ⇒ Object
- #get(endpoint, options = {}) ⇒ Object
- #head(endpoint, options = {}) ⇒ Object
- #patch(endpoint, body, options = {}) ⇒ Object
- #post(endpoint, body, options = {}) ⇒ Object
Instance Method Details
#delete(endpoint, options = {}) ⇒ Object
28 29 30 |
# File 'lib/pushpad/request.rb', line 28 def delete(endpoint, = {}) perform(Net::HTTP::Delete, endpoint, ) end |
#get(endpoint, options = {}) ⇒ Object
12 13 14 |
# File 'lib/pushpad/request.rb', line 12 def get(endpoint, = {}) perform(Net::HTTP::Get, endpoint, ) end |
#head(endpoint, options = {}) ⇒ Object
8 9 10 |
# File 'lib/pushpad/request.rb', line 8 def head(endpoint, = {}) perform(Net::HTTP::Head, endpoint, ) end |
#patch(endpoint, body, options = {}) ⇒ Object
22 23 24 25 26 |
# File 'lib/pushpad/request.rb', line 22 def patch(endpoint, body, = {}) perform(Net::HTTP::Patch, endpoint, ) 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, = {}) perform(Net::HTTP::Post, endpoint, ) do |request| request.body = body end end |