summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-10-18 16:35:37 -0700
committerWinnie Hellmann <winnie@gitlab.com>2017-10-21 23:32:05 +0300
commit5717a1de82967c38cf638d6063e61dd0494c1344 (patch)
tree17cfc9f702bf99474b858ac5619c81931a4ccce5
parentd3ecf95d0c762946707c6aaec2e97396c6a014e3 (diff)
downloadgitlab-ce-5717a1de82967c38cf638d6063e61dd0494c1344.tar.gz
Document converting `+` to `%2B` in an API query parameter
[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 3145c9b676f..de0fe79b3d6 100644
--- a/doc/api/README.md
+++ b/doc/api/README.md
@@ -455,6 +455,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