curl - Cloud Foundry CLI Reference Guide |
cf curl PATH [-iv] [-X METHOD] [-H HEADER]... [-d DATA] [--output FILE]
By default 'cf curl' will perform a GET to the specified PATH. If data
is provided via -d, a POST will be performed instead, and the Content-Type
will be set to application/json. You may override headers with -H and the
request method with -X.
For API documentation, please visit http://apidocs.cloudfoundry.org.
cf curl "/v2/apps" -X GET -H "Content-Type: application/x-www-form-urlencoded" -d 'q=name:myapp'
cf curl "/v2/apps" -d @/path/to/file
Custom headers to include in the request, flag can be specified multiple times
HTTP method (GET,POST,PUT,DELETE,etc)
HTTP data to include in the request body, or '@' followed by a file name to read the data from
Server errors return exit code 22
Include response headers in the output
Write curl body to FILE instead of stdout