Hi, I am new to Clojure and using clj-http for the first time, to implement 
a REST client.
I don't find anywhere how to indicate where my SSL certificate is located.
Here is what I did:

(ns my-client.core
  (:require [clj-http.client :as client]
            [clojure.pprint :refer :all]))

(def my-appkey "...")

(defn login [username password appkey]
  (client/post "https://.../api/certlogin";
               {:headers     {"X-Application" appkey
                              "Content-Type" 
"application/x-www-form-urlencoded"}
                :form-params {"username" username "password" password}}))

(defn -main []
  (pprint (login "..." "..." my-appkey)))


This sends me back a response which indicates that I need to send the SSL 
certificate.
When I send the same request with curl and indicate the certificates, it 
works. This is the successful curl request:

curl -q -k --cert client-2048.crt --key client-2048.key 
https://.../api/certlogin 
-d "username=...&password=..." -H "X-Application: ..."
 


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to