Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (38 sloc) 1.217 kB
require 'net/http'
payload = %Q{{
"before": "5aef35982fb2d34e9d9d4502f6ede1072793222d",
"repository": {
"url": "http://github.com/defunkt/github",
"name": "github",
"owner": {
"email": "chris@ozmm.org",
"name": "defunkt"
}
},
"commits": {
"41a212ee83ca127e3c8cf465891ab7216a705f59": {
"url": "http://github.com/defunkt/github/commit/41a212ee83ca127e3c8cf465891ab7216a705f59",
"author": {
"email": "chris@ozmm.org",
"name": "Chris Wanstrath"
},
"message": "okay i give in",
"timestamp": "2008-02-15T14:57:17-08:00"
},
"de8251ff97ee194a289832576287d6f8ad74e3d0": {
"url": "http://github.com/defunkt/github/commit/de8251ff97ee194a289832576287d6f8ad74e3d0",
"author": {
"email": "chris@ozmm.org",
"name": "Chris Wanstrath"
},
"message": "update pricing a tad",
"timestamp": "2008-02-15T14:36:34-08:00"
}
},
"after": "de8251ff97ee194a289832576287d6f8ad74e3d0"
}}
url = URI.parse('http://localhost:4567/')
req = Net::HTTP::Post.new(url.path)
req.set_form_data({'payload' => payload})
res = Net::HTTP.new(url.host, url.port).start {|http| http.request(req) }
puts res
Jump to Line
Something went wrong with that request. Please try again.