Skip to content

Instantly share code, notes, and snippets.

@imgyf
Created September 1, 2021 12:37
Show Gist options
  • Save imgyf/98b191904532c5413befd849c31c9e60 to your computer and use it in GitHub Desktop.
Save imgyf/98b191904532c5413befd849c31c9e60 to your computer and use it in GitHub Desktop.
How to send POST request to NotifyXF using Ruby
require 'uri'
require 'net/http'
uri = URI('https://notifyxf.com/api/message')
res = Net::HTTP.post_form(uri, 'access_token' => 'INSERT_CREDENTIALS_HERE', 'message' => 'Greetings from NotifyXF in Ruby')
puts res.body if res.is_a?(Net::HTTPSuccess)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment