Skip to content

Instantly share code, notes, and snippets.

@LevelbossMike
Created October 22, 2012 10:11
Show Gist options
  • Save LevelbossMike/3930762 to your computer and use it in GitHub Desktop.
Save LevelbossMike/3930762 to your computer and use it in GitHub Desktop.
jakob fubar
requestFunction = (url, data) ->
$.ajax
url: url
data: data if data?
success: (response) ->
# do something with the response
console.log response
requestFunction("/posts")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment