Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. curl -X POST http://127.0.0.1:8000/snippets/ -d "code=print 789" -u username:password
  2.  
  3. {"id": 5, "owner": "tom", "title": "foo", "code": "print 789", "linenos": false, "language": "python", "style": "friendly"}
  4.  
  5. $http.post('http://localhost:8000/snippets/', self.newSnippet)
  6. .then(fetchSnippets())
  7. .then(function (response) {
  8. self.newSnippet = {};
  9. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement