summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Myers <gmyers@gitlab.com>2019-06-28 12:08:51 -0600
committerGreg Myers <gmyers@gitlab.com>2019-06-28 12:08:51 -0600
commitf706677357fcdf9cd870d098379788543ea71058 (patch)
treea5235cb2031ae96bab11f8a86f81e125d0035478
parent1cd8fb49f9b9150faf50767edbdfb564fde8576b (diff)
downloadgitlab-ce-f706677357fcdf9cd870d098379788543ea71058.tar.gz
Quote URL for curl api commands containing &
Encapsulate URL for commands with ampersand in URL
-rw-r--r--doc/api/environments.md2
-rw-r--r--doc/api/events.md6
-rw-r--r--doc/api/group_badges.md2
-rw-r--r--doc/api/snippets.md2
4 files changed, 6 insertions, 6 deletions
diff --git a/doc/api/environments.md b/doc/api/environments.md
index 44f86861ff7..229ddc00890 100644
--- a/doc/api/environments.md
+++ b/doc/api/environments.md
@@ -15,7 +15,7 @@ GET /projects/:id/environments
| `search` | string | no | Return list of environments matching the search criteria. Mutually exclusive with `name` |
```bash
-curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/environments?name=review%2Ffix-foo
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/environments?name=review%2Ffix-foo"
```
Example response:
diff --git a/doc/api/events.md b/doc/api/events.md
index 6dca8e52f69..48c035ba45b 100644
--- a/doc/api/events.md
+++ b/doc/api/events.md
@@ -71,7 +71,7 @@ Parameters:
Example request:
```
-curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/events?target_type=issue&action=created&after=2017-01-31&before=2017-03-01
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/events?target_type=issue&action=created&after=2017-01-31&before=2017-03-01"
```
Example response:
@@ -275,8 +275,8 @@ Parameters:
Example request:
-```
-curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/:project_id/events?target_type=issue&action=created&after=2017-01-31&before=2017-03-01
+```bash
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/:project_id/events?target_type=issue&action=created&after=2017-01-31&before=2017-03-01"
```
Example response:
diff --git a/doc/api/group_badges.md b/doc/api/group_badges.md
index f88689d80c6..365c92653ac 100644
--- a/doc/api/group_badges.md
+++ b/doc/api/group_badges.md
@@ -179,7 +179,7 @@ GET /groups/:id/badges/render
| `image_url` | string | yes | URL of the badge image |
```bash
-curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/badges/render?link_url=http%3A%2F%2Fexample.com%2Fci_status.svg%3Fproject%3D%25%7Bproject_path%7D%26ref%3D%25%7Bdefault_branch%7D&image_url=https%3A%2F%2Fshields.io%2Fmy%2Fbadge
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/:id/badges/render?link_url=http%3A%2F%2Fexample.com%2Fci_status.svg%3Fproject%3D%25%7Bproject_path%7D%26ref%3D%25%7Bdefault_branch%7D&image_url=https%3A%2F%2Fshields.io%2Fmy%2Fbadge"
```
Example response:
diff --git a/doc/api/snippets.md b/doc/api/snippets.md
index 1ce0b1e7a62..852aeac906e 100644
--- a/doc/api/snippets.md
+++ b/doc/api/snippets.md
@@ -304,7 +304,7 @@ Parameters:
Example request:
```sh
-curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/snippets/public?per_page=2&page=1
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/snippets/public?per_page=2&page=1"
```
Example response: