Build Service/Curl

From openSUSE

(Difference between revisions)
Revision as of 17:57, 3 August 2007
Poeml (Talk | contribs)
How to use curl for build service development - Mention osc req
� Previous diff
Revision as of 14:47, 20 November 2007
Lrupp (Talk | contribs)

Next diff →
Line 3: Line 3:
{{Info|Note, the commandline client osc has a way to issue generic commands. So you may not need to resort to curl. <br /> See '''osc help req'''.}} {{Info|Note, the commandline client osc has a way to issue generic commands. So you may not need to resort to curl. <br /> See '''osc help req'''.}}
- 
Curl is a command line tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, TFTP, DICT, TELNET, LDAP or FILE). Curl is a command line tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, TFTP, DICT, TELNET, LDAP or FILE).
Line 9: Line 8:
The command is designed to work without user interaction. The command is designed to work without user interaction.
-It can help testing the openSUSE build service API a lot while development.+It can help testing the [https://api.opensuse.org/apidocs/ openSUSE build service API] a lot while development.

Revision as of 14:47, 20 November 2007

Contents

How to use curl for build service development


Note, the commandline client osc has a way to issue generic commands. So you may not need to resort to curl.
See osc help req.

Curl is a command line tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, TFTP, DICT, TELNET, LDAP or FILE).

The command is designed to work without user interaction.

It can help testing the openSUSE build service API a lot while development.


Here are the most commonly used commands:


GET request

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

PUT request

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

POST request

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

DELETE request

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