Skip to content

Instantly share code, notes, and snippets.

@fairchild
Created December 23, 2009 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fairchild/262248 to your computer and use it in GitHub Desktop.
Save fairchild/262248 to your computer and use it in GitHub Desktop.
example of posting an anonymous gist with curl
curl -i -F file_name[gistfile1]='foooo' -F file_contents[gistfile1]='abcde' -F file_ext[gistfile1]='.sh' http://gist.github.com/gists
@dan-bryant
Copy link

For anyone wondering upon this gist. The new way to do this is:

curl --request POST --data {"description":"example of posting an anonymous gist with curl","public":"true","files":{"foooo.sh":{"content":"abcde"}} https://api.github.com/gists

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