Created
September 1, 2021 12:37
-
-
Save imgyf/98b191904532c5413befd849c31c9e60 to your computer and use it in GitHub Desktop.
How to send POST request to NotifyXF using Ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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