Skip to content

Instantly share code, notes, and snippets.

@yyoshiki41
Last active December 19, 2015 12:23
Show Gist options
  • Save yyoshiki41/492503f74e75a132846c to your computer and use it in GitHub Desktop.
Save yyoshiki41/492503f74e75a132846c to your computer and use it in GitHub Desktop.
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://hooks.slack.com/services/****")
payload = {
text: "こんなかんじでいける",
channel: "@dareka",
username: "oreore",
icon_emoji: ":ghost:"
}
Net::HTTP.post_form(uri, { payload: payload.to_json })
@kentokento
Copy link

Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment