Send Direct Push Notification - Ruby

Source Code:

  
                          require 'uri'
require 'net/http'

url = URI("https://send.pushnotificationapi.com/v1/push/send_direct")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/x-www-form-urlencoded'
request["cache-control"] = 'no-cache'
request.body = "api_key=YOUR-API-KEY&device_token=YOUR-DEVICE-TOKEN&platform=iOS&msg_title=test%20message&destination_url=https%3A%2F%2Fpushnotificationapi.com"

response = http.request(request)
puts response.read_body