Class: Rpush::Daemon::Webpush::Request

Inherits:
WebPush::Request
  • Object
show all
Defined in:
lib/rpush/daemon/webpush/delivery.rb

Overview

Webpush::Request handles all the encryption / signing. We just override #perform to inject the http instance that is managed by Rpush.

Instance Method Summary collapse

Instance Method Details

#perform(http) ⇒ Object



14
15
16
17
18
# File 'lib/rpush/daemon/webpush/delivery.rb', line 14

def perform(http)
  req = Net::HTTP::Post.new(uri.request_uri, headers)
  req.body = body
  http.request(uri, req)
end