Skip to content

Instantly share code, notes, and snippets.

Avatar

Arpit Jha Arpit360

View GitHub Profile
View example_gist_create.rb
require 'net/http'
require 'uri'
# /api/v1/:format/new
# /api/v1/:format/gists/:user
# /api/v1/:format/:gist_id
res = Net::HTTP.post_form(URI.parse('http://gist.github.com/api/v1/xml/new'),
{ 'files[file1.ab]' => 'CONTNETS',
'files[file2.ab]' => 'contents' })
You can’t perform that action at this time.