Module: Pushpad::Request
Instance Method Summary collapse
- #get(endpoint, options = {}) ⇒ Object
- #head(endpoint, options = {}) ⇒ Object
- #post(endpoint, body, options = {}) ⇒ Object
Instance Method Details
#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 |
#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 |