Created
January 18, 2017 06:17
-
-
Save tlrobinson/78df38a02743aacdf9b89b5522b1b626 to your computer and use it in GitHub Desktop.
Clojure/Ring JSONP response
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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