summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-10-18 16:35:37 -0700
committerStan Hu <stanhu@gmail.com>2017-10-18 19:15:45 -0700
commitefbb9cfb7b6ebc8a0c724d103c6e1063e049f205 (patch)
treeef87704ad9311202025fada690c4d4e7ae5cdcc8
parent9c71fb0de2f0a7482b1a59c673142981ecdab26f (diff)
downloadgitlab-ce-efbb9cfb7b6ebc8a0c724d103c6e1063e049f205.tar.gz
Document converting `+` to `%2B` in an API query parametersh-document-plus-encoding-api
[ci skip]
-rw-r--r--doc/api/README.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/api/README.md b/doc/api/README.md
index 3fd4c97e536..1ec85b71213 100644
--- a/doc/api/README.md
+++ b/doc/api/README.md
@@ -441,6 +441,23 @@ Content-Type: application/json
}
```
+## Encoding `+` in ISO 8601 dates
+
+If you need to include a `+` in a query parameter, you may need to use `%2B` instead due
+a [W3 recommendation]((http://www.w3.org/Addressing/URL/4_URI_Recommentations.html) that
+causes a `+` to be interpreted as a space. For example, in an ISO 8601 date, you may want to pass
+a time in Mountain Standard Time, such as:
+
+```
+2017-10-17T23:11:13.000+05:30
+```
+
+The correct encoding for the query parameter would be:
+
+```
+2017-10-17T23:11:13.000%2B05:30
+```
+
## Clients
There are many unofficial GitLab API Clients for most of the popular