Skip to content

Instantly share code, notes, and snippets.

@iamsolarpowered
Created September 20, 2012 23:27
Show Gist options
  • Save iamsolarpowered/3758945 to your computer and use it in GitHub Desktop.
Save iamsolarpowered/3758945 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'net/http'
require 'json'
http = Net::HTTP.new 'api.github.com', 443
http.use_ssl = true
path = '/repos/crankapps/whisper.me/statuses/dc34d819a3fc14361261b570b5c00c92cc59e4f8'
payload = { 'state' => 'error',
'target_url' => 'http://crankapps.com',
'description' => 'A test.'
}.to_json
request = Net::HTTP::Post.new path
request.body = payload
request.basic_auth 'iamsolarpowered', 'cre@te17'
response = http.request request
puts response
@iamsolarpowered
Copy link
Author

Just realized, this doesn't work. 😊

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