Hi, @mattrepl .
First, Thank you for this useful library for OAuth with Clojure-life. :)
I'm using this to connect between my web application to Twitter APIs.
But I cared following points:
Corresponding the response body for clj-http
The HTTP request functions of clj-http will throw ExceptionInfo via slingshot.
throw+ is just it.
Note that clj-http will throw this exception when status code is just 4xx or 5xx.
But current clj-oauth has thrown Exception even if status code is over 300...
The status code 3xx is redirect. It is not error.
This is not so good because errors from clj-http has been replaced other errors.
I thought better We follow errors from clj-http because it is doing well currently.
Therefore this code will not be needed.
Why did you ignore other fields? Those should not be ignored because are also needed for HTTP connections.
If we need to decode response body, this should be written following code instead:
Hi, @mattrepl . First, Thank you for this useful library for OAuth with Clojure-life. :) I'm using this to connect between my web application to Twitter APIs. But I cared following points:
Corresponding the response body for clj-http
The HTTP request functions of clj-http will throw ExceptionInfo via slingshot.
throw+
is just it. Note that clj-http will throw this exception when status code is just 4xx or 5xx. But current clj-oauth has thrown Exception even if status code is over 300... The status code 3xx is redirect. It is not error.This is not so good because errors from clj-http has been replaced other errors. I thought better We follow errors from clj-http because it is doing well currently. Therefore this code will not be needed.
Not ignoring other fields
Why did you ignore other fields? Those should not be ignored because are also needed for HTTP connections. If we need to decode response body, this should be written following code instead:
Finally, I'll repeat that clj-oauth is very useful library. ;)