Commit 6ca778c9 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'msj-update-curl-examples' into 'master'

Update cURL examples in the style guide

See merge request gitlab-org/gitlab!20221
parents 33816c1e 57b7c7c9
......@@ -1180,11 +1180,11 @@ Rendered example:
username and password.
| Methods | Description |
|:-------------------------------------------|:------------------------------------------------------|
| `-H "PRIVATE-TOKEN: <your_access_token>"` | Use this method as is, whenever authentication needed |
| `-X POST` | Use this method when creating new objects |
| `-X PUT` | Use this method when updating existing objects |
| `-X DELETE` | Use this method when removing existing objects |
|:------------------------------------------- |:------------------------------------------------------|
| `--header "PRIVATE-TOKEN: <your_access_token>"` | Use this method as is, whenever authentication needed |
| `--request POST` | Use this method when creating new objects |
| `--request PUT` | Use this method when updating existing objects |
| `--request DELETE` | Use this method when removing existing objects |
### cURL Examples
......@@ -1206,9 +1206,9 @@ Create a new project under the authenticated user's namespace:
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects?name=foo"
```
#### Post data using cURL's --data
#### Post data using cURL's `--data`
Instead of using `-X POST` and appending the parameters to the URI, you can use
Instead of using `--request POST` and appending the parameters to the URI, you can use
cURL's `--data` option. The example below will create a new project `foo` under
the authenticated user's namespace.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment