Sha256: 98e14bc1668bc3b0caf0c3efa5928cd480f1ddbf0007b437792c91f15dff7d49
Contents?: true
Size: 618 Bytes
Versions: 21
Compression:
Stored size: 618 Bytes
Contents
module Rpush module Daemon module Wns class RawRequest def self.create(notification, access_token) body = notification.data.to_json uri = URI.parse(notification.uri) post = Net::HTTP::Post.new( uri.request_uri, "Content-Length" => body.length.to_s, "Content-Type" => "application/octet-stream", "X-WNS-Type" => "wns/raw", "X-WNS-RequestForStatus" => "true", "Authorization" => "Bearer #{access_token}" ) post.body = body post end end end end end
Version data entries
21 entries across 21 versions & 2 rubygems