> Might be a silly suggestion but are the first 3 connections leading to > redirects (30x's) ???
Interesting idea. I will check. You are thinking that I should: {"http.protocol.allow-circular-redirects" false yes? On Mar 5, 2:39 am, Marc Boschma <marc.bosc...@gmail.com> wrote: > Might be a silly suggestion but are the first 3 connections leading to > redirects (30x's) ??? > > On 05/03/2013, at 10:18 AM, larry google groups <lawrencecloj...@gmail.com> > wrote: > > > > > > > > > > > So, thanks to Michael Klishin, Aaron Cohen, Frank Siebenlist and Craig > > Brozefsky I am now able to correctly ping the Omniture API. But I am > > getting a strange behavior from the clj-http library. It makes 4 calls > > to the API server, even though the first call is successful. > > > When I look here: > > >https://github.com/dakrone/clj-http > > > I see it says: > > > ;; Apache's http client automatically retries on IOExceptions, if you > > ;; would like to handle these retries yourself, you can specify a > > ;; :retry-handler. > > > So, since it re-tries, I should assume that it is encountering an > > IOException. But I get a successful response on the first try, so what > > would the IOException be? > > > Because clj-http uses Slingshot, I have wrapped it in a "try+ / catch > > Object o" block. And I print the "o" to the terminal, and yet I am not > > seeing anything in the terminal. So where is the IOException? How do I > > find it? > > > This is the actual function I use to ping the Omniture API: > > > (defn omniture-call-api [url-with-queue-method api-payload headers] > > (timbre/spy :debug " return value of omniture-call-api " > > (try+ > > (http-client/post url-with-queue-method > > {:body api-payload > > :debug true > > :debug-body true > > :insecure true > > :headers {"X-Api-Version" "2" > > "X-WSSE" headers} > > :content-type :json > > :socket-timeout 4000 > > :conn-timeout 4000 > > :accept :json > > :client-params > > {"http.protocol.allow-circular-redirects" true > > "http.useragent" > > "clj-http"}}) > > (catch Object o (println (pp/pprint o)))))) > > > If there is an IOException, why doesn't this line catch it? > > > (catch Object o (println (pp/pprint o)) > > > I read here that "catch Object o" is the correct way to catch > > everything, using Slingshot: > > >https://github.com/scgilardi/slingshot/issues/24 > > > So why would I not see this error? > > > -- > > -- > > 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, visithttps://groups.google.com/groups/opt_out. -- -- 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/groups/opt_out.