Yes, there was an authorisation problem, I have to include :with-credentials? 
false. Additionally the "Content-Type" has to be specified in the headers. 
The following call works now:
(go (let [response (<! (http/post 
"https://content.dropboxapi.com/2/files/download";
                                  {:with-credentials? false
                                   :headers {"authorization" "Bearer 
QfCC..."
                                             "Dropbox-API-Arg" 
"{\"path\":\"/log.txt\"}"
                                             "Content-Type" "text/plain; 
charset=utf-8"}         
                                   }))] 
      (println response)))

Thanks for your help!

Johannes

Am Dienstag, 26. Juni 2018 12:51:14 UTC+2 schrieb Immo Heikkinen:
>
> Have you checked JS console in your browser, does is show any errors?
>
> Br,
> Immo
>
> ti 26. kesäk. 2018 klo 13.36 Johannes <bra...@nordakademie.de 
> <javascript:>> kirjoitti:
>
>> Thanks Immo, what a silly mistake!
>>
>> But after having corrected it, I get the same result as before:
>>
>> (go (let [response (<! (http/post "
>> https://content.dropboxapi.com/2/files/download";
>>                                   {:headers {"authorization" "Bearer 
>> QfCCK..."
>>                                              "Dropbox-API-Arg" 
>> "{\"path\":\"/log.txt\"}"}         
>>                                    }))] 
>>       (println response)))
>>
>> ==>
>>
>> #object[*cljs.core.async.impl.channels.ManyToManyChannel*]
>>
>> {:status 0, :success false, :body , :headers {}, :trace-redirects [
>> https://content.dropboxapi.com/2/files/download 
>> https://content.dropboxapi.com/2/files/download], :error-code 
>> :http-error, :error-text  [0]}
>>
>> Am Dienstag, 26. Juni 2018 11:54:22 UTC+2 schrieb Immo Heikkinen:
>>
>>> You have slash instead of dot after "content" in the url: "
>>> https://content/dropboxapi.com/2/files/download";
>>>
>>> Br,
>>> Immo
>>>
>>>
>>>
>>> ti 26. kesäk. 2018 klo 10.38 Thomas <th.van...@gmail.com> kirjoitti:
>>>
>> I have no idea what could be wrong here... sorry.
>>>>
>>>> Thomas
>>>>
>>>> On Monday, 25 June 2018 14:38:12 UTC+2, Johannes wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am trying to download a file from Dropbox which I can get with the 
>>>>> Http request:
>>>>>
>>>>> POST /2/files/download Host: https://content.dropboxapi.com User-Agent: 
>>>>> api-explorer-client Authorization: Bearer QfCCK... Dropbox-API-Arg: 
>>>>> {"path":"/log.txt"}
>>>>>
>>>>> or the curl request looks like that:
>>>>>
>>>>> curl -X POST https://content.dropboxapi.com/2/files/download \ --header 
>>>>> 'Authorization: Bearer QfCCK...' \ --header 'Dropbox-API-Arg: 
>>>>> {"path":"/log.txt"}'
>>>>>
>>>>> If I try the following using cli-http in a Clojurescript repl:
>>>>>
>>>>> (go (let [response (<! (http/post "
>>>>> https://content/dropboxapi.com/2/files/download"; {:headers 
>>>>> {"authorization" "Bearer QfCCK..." "Dropbox-API-Arg" 
>>>>> "{\"path\":\"/log.txt\"}"} }))] (println response)))
>>>>>
>>>>> I get
>>>>>
>>>>> #object[*cljs.core.async.impl.channels.ManyToManyChannel*]
>>>>>
>>>>> {:status 0, :success false, :body , :headers {}, :trace-redirects [
>>>>> https://content/dropboxapi.com/2/files/download 
>>>>> https://content/dropboxapi.com/2/files/download], :error-code 
>>>>> :http-error, :error-text  [0]}
>>>>>
>>>>>
>>>>> I cannot figure out where my mistake is. Any help?
>>>>>
>>>>>
>>>>> Johannes
>>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Clojure" group.
>>>>
>>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com.
>>>
>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> <javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> 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+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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