Fork me on GitHub
#clj-http
<
2023-05-22
>
mmer09:05:55

A quick question about the oauth-token - what does that get mapped to in the http header? I am trying to convert some of my clojure http to work in ansible, hence the question.

serioga13:05:41

(defn- oauth-request
  [req]
  (if-let [oauth-token (:oauth-token req)]
    (-> req (dissoc :oauth-token)
        (assoc-in [:headers "authorization"]
                  (str "Bearer " oauth-token)))
    req))

serioga13:05:41

(defn- oauth-request
  [req]
  (if-let [oauth-token (:oauth-token req)]
    (-> req (dissoc :oauth-token)
        (assoc-in [:headers "authorization"]
                  (str "Bearer " oauth-token)))
    req))