(ns my-app.core (:require [cljs-http.client :as http])) (defn handler [response] (println (:body response))) (defn main [] (let [data {"content" "(println (int (Math/sqrt 4092529)))" "syntax" "clojurescript"} headers {"Content-Type" "application/x-www-form-urlencoded"}] (-> (http/post "https://dpaste.com/api/" {:form-params data :headers headers}) (js/Promise.then handler))))