Skip to content

Instantly share code, notes, and snippets.

View imgyf's full-sized avatar

Yifan Goh imgyf

View GitHub Profile
@imgyf
imgyf / notifyxf.rb
Created September 1, 2021 12:37
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)