gpt4 book ai didi

android - 是否可以在没有任何库的情况下仅使用 GET 和 POST 请求来使用 Dropbox REST API?

转载 作者:行者123 更新时间:2023-11-29 16:05:56 25 4
gpt4 key购买 nike

此外,最好不要启动用于用户登录的网络浏览器。例如,ES 文件管理器在其自己的 fragment 中显示此表单。

我需要我的应用程序非常小,而大多数库只有几兆字节。

最佳答案

你当然可以在没有库的情况下访问 API,但所有身份验证都需要 OAuth(这需要打开浏览器)。所有对核心 API 的调用都只是带有 header Authorization: Bearer <token> 的 HTTP ,所以任何 HTTP 库都可以。比如这个curl命令将写入一个名为 hello.txt 的文件:

curl -X PUT https://api-content.dropbox.com/1/files_put/auto/hello.txt?overwrite=false \
-H 'Authorization: Bearer <YOUR_TOKEN>' \
-H 'Content-Type: text/plain' \
-d 'Hello, World!'

请参阅我关于如何调用核心 API 的博文 from the command-line with curl以及如何使用多种语言来实现 without using an OAuth or Dropbox library .

关于android - 是否可以在没有任何库的情况下仅使用 GET 和 POST 请求来使用 Dropbox REST API?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18491391/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com