Skip to content

Instantly share code, notes, and snippets.

@k0kubun
Created March 12, 2013 23:03
Show Gist options
  • Save k0kubun/5147913 to your computer and use it in GitHub Desktop.
Save k0kubun/5147913 to your computer and use it in GitHub Desktop.
im.kayac.com
# -*- coding: utf-8 -*-
require "net/http"
require "uri"
uri = URI.parse("http://im.kayac.com/api/post/USERNAME")
Net::HTTP.start(uri.host, uri.port){|http|
request = Net::HTTP::Post.new(uri.path)
request.set_form_data({:message=>"MESSAGE"})
response = http.request(request)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment