首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >"curl“是什么意思?

"curl“是什么意思?
EN

Stack Overflow用户
提问于 2012-03-17 17:26:12
回答 4查看 26.4K关注 0票数 23

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

我在谷歌上搜索CURL,找到了一些关于它的描述。我不知道Facebook想让我怎么使用它。

代码语言:javascript
复制
curl -F "title=Example Title" -F "description=Description" \
-F "start_time=1329417443" \
"https://graph.facebook.com/PAGE_ID/milestones?access_token=_"

这对我来说是胡说八道。你能帮助我理解在什么情况下我可以在Facebook上使用它,也许是在一般情况下,并指导我在哪里可以找到更多关于这个主题的正确方向?

EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2012-03-17 17:32:12

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

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

票数 15
EN

Stack Overflow用户

发布于 2012-03-17 17:29:50

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

引用自man curl

代码语言:javascript
复制
   -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.
票数 7
EN

Stack Overflow用户

发布于 2012-03-17 17:32:36

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9748809

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档