Commit ffab14f3 authored by Mike Jang's avatar Mike Jang Committed by Craig Norris

Minor style edits

Revamped intro sentence and applied reviewer's observation.
parent 8bb6cc6f
...@@ -136,14 +136,26 @@ curl --data "name=foo" --header "PRIVATE-TOKEN: <your_access_token>" "https://gi ...@@ -136,14 +136,26 @@ curl --data "name=foo" --header "PRIVATE-TOKEN: <your_access_token>" "https://gi
### Post data using JSON content ### Post data using JSON content
NOTE: **Note:** This example creates a new group. Be aware of the use of single (`'`) and double
In this example we create a new group. Watch carefully the single and double (`"`) quotes.
quotes.
```shell ```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --header "Content-Type: application/json" --data '{"path": "my-group", "name": "My group"}' "https://gitlab.example.com/api/v4/groups" curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --header "Content-Type: application/json" --data '{"path": "my-group", "name": "My group"}' "https://gitlab.example.com/api/v4/groups"
``` ```
For readability, you can also set up the `--data` by using the following format:
```shell
curl --request POST \
--url "https://gitlab.example.com/api/v4/groups" \
--header "content-type: application/json" \
--header "PRIVATE-TOKEN: <your_access_token>" \
--data '{
"path": "my-group",
"name": "My group"
}'
```
### Post data using form-data ### Post data using form-data
Instead of using JSON or urlencode you can use multipart/form-data which Instead of using JSON or urlencode you can use multipart/form-data which
......
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