Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
gist example api post
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(''),
{ 'files[file1.ab]' => 'CONTNETS',
'files[file2.ab]' => 'contents' })
puts res.body
<?xml version="1.0" encoding="UTF-8"?>
<gists type="array">
<public type="boolean">true</public>
<description nil="true"></description>
<created-at type="datetime">2008-08-06T13:30:32-07:00</created-at>
Copy link

britzke commented Oct 29, 2012

fsdg sdfg sdf gsdfgsdfgsdfg

Copy link

manueltorrez commented Sep 12, 2017

I still don't know what are gists used for

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