Skip to content

Instantly share code, notes, and snippets.

@fixxer fixxer/dadata.clj

Last active May 16, 2019
What would you like to do?
(ns fixxer.dadata
(:require [clj-http.client :as http]
[cheshire.core :as json]))
(def api-key "your-api-key")
(def secret-key "your-secret-key")
(defn clean [request]
(->> request
(assoc {:content-type :json
:headers {"Authorization" (str "Token " api-key)
"X-Secret" secret-key}} :body)
(http/post "")
(let [request {:structure ["ADDRESS"]
:data [["Москва, Милютинский 13"]]}]
(println (clean request)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.