Skip to content

Instantly share code, notes, and snippets.

@tlrobinson
Created January 18, 2017 06:17
Show Gist options
  • Save tlrobinson/78df38a02743aacdf9b89b5522b1b626 to your computer and use it in GitHub Desktop.
Save tlrobinson/78df38a02743aacdf9b89b5522b1b626 to your computer and use it in GitHub Desktop.
Clojure/Ring JSONP response
(defn jsonp-response
[object callback]
{:status 200
:headers {"Content-Type" "application/javascript"}
:body (str callback "(" (cheshire.core/generate-string object) ")")})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment