Skip to content

Instantly share code, notes, and snippets.

@illbzo1
Created August 14, 2012 19:05
Show Gist options
  • Save illbzo1/3351780 to your computer and use it in GitHub Desktop.
Save illbzo1/3351780 to your computer and use it in GitHub Desktop.
DocRaptor Examples Set 3 - Simple Curl Commands
#This simple Curl example will create a sample test Excel file with the authentication information as part of the POST data. All you have to do is copy this code, plug in your API key, and paste it into a command line.
curl -H "Content-Type:application/json" -d'{"user_credentials":"YOUR_API_KEY_HERE", "doc":{"name":"docraptor_sample.xls", "document_type":"xls", "test":"true", "document_content":"<table><tr><td>Example!</td></tr></table>"}}' http://docraptor.com/docs > docraptor_sample.xls
#This simple Curl example will create a sample test PDF with the authentication information as part of the POST data. All you have to do is copy this code, plug in your API key, and paste it into a command line.
curl -H "Content-Type:application/json" -d'{"user_credentials":"YOUR_API_KEY_HERE", "doc":{"name":"docraptor_sample.pdf", "document_type":"pdf", "test":"true", "document_url":"http://www.docraptor.com"}}' http://docraptor.com/docs > docraptor_sample.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment