什么是“;卷曲;意思是

What does "curl" mean?

本文关键字:卷曲 意思是 什么      更新时间:2023-09-26

我每天都在开发Facebook JavaScript应用程序,但在Facebook文档和我访问的其他网站上,我不断地发现一些我不理解的代码片段。

我在谷歌上搜索了CURL,发现了一些关于它的描述。我不知道Facebook希望我如何使用它。

curl -F "title=Example Title" -F "description=Description" '
-F "start_time=1329417443" '
"https://graph.facebook.com/PAGE_ID/milestones?access_token=_"

这对我来说是荒谬的。你能帮助我理解在什么情况下我可以将它用于Facebook,也许是一般情况下,并引导我朝着正确的方向去寻找更多关于这个主题的信息吗?

curl是一个命令行实用程序,用于发送HTTP请求。它对于使用web服务API进行开发非常有用。我相信大多数linux发行版都预装了它,但你需要下载并安装它。(它可能与Cygwin一起提供,但也可以单独安装。)

我建议确保它的目录被添加到您的PATH环境变量中。同样,在linux中可能不是问题,但您需要在windows中手动执行此操作。

curl是一个获取请求的命令。-F--form)参数用于指定表单POST参数。

引用自man curl:

   -F/--form <name=content>
          (HTTP) This lets curl emulate a filled-in form in which a  user
          has  pressed  the  submit button. This causes curl to POST data
          using the Content-Type  multipart/form-data  according  to  RFC
          2388.  This enables uploading of binary files etc. To force the
          'content' part to be a file, prefix the file  name  with  an  @
          sign. To just get the content part from a file, prefix the file
          name with the symbol <. The difference between @ and < is  then
          that  @ makes a file get attached in the post as a file upload,
          while the < makes a text field and just get  the  contents  for
          that text field from a file.

curl是一种获取项目的方法。-F是众多参数之一。。。

http://curl.haxx.se/docs/manpage.html

还有:

你看到了吗http://developers.facebook.com/docs/reference/api/batch/

它可能对这样的东西有用

http://chaolam.wordpress.com/2010/06/07/implementing-facebook-real-time-updates-api-with-curl-examples/

当然,FB文档使用curl来展示执行请求的常见基本方法。。。这取决于您使用的实际方式是什么平台语言库来执行图形http请求

因此,如果你是Facebook JavaScript开发人员,你必须使用XMLHttpRequest(或者我假设Facebook-js-lib调用)