编译服务/Curl

Jump to: navigation, search

如何使用curl来开发编译服务

Icon-info.png
注意,命令行客户端osc在一些命令中有问题,因此您也许需要使用curl。
参见osc help req

Curl是一个命令行工具来从服务器上获取数据或传送数据到服务器上,这需要使用一种支持的协议(HTTP, HTTPS, FTP, FTPS, TFTP, DICT, TELNET, LDAP 或 FILE)。

这个命令被设计为不需要与用户进行交互。

它能够在开发过程中帮助测试openSUSE编译服务API。

这里列出了最常用的命令:

GET 请求

curl -u username:password -X GET http://some.host/any/path

PUT 请求

curl -u username:password -X PUT -T /path/to/file/to/put http://some.host/any/path

POST 请求

curl -u username:password -X POST -T /path/to/file/to/post http://some.host/any/path

DELETE 请求

curl -u username:password -X DELETE http://some.host/any/path