Encoding of query params doesn't work when marked optional
- Dominant language
- Clojure
- Stars
- 14
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
When marked as optional:
```
(def compiled
(contextual.http/compile-request '{:query-params {:timestamp ^:optional timestamp}, :method "get"}
{'timestamp (contextual.core/path :ts)}
{}
{:serialize-query-params true}))
(contextual.core/invoke compiled {:ts "2021-05-28 16:22:55.000+00 00"})
=> {:method "get", :url "?timestamp=2021-05-28 16:22:55.000+00 00"}
```
When not marked as optional:
```
(def compiled
(contextual.http/compile-request '{:query-params {:timestamp timestamp}, :method "get"}
{'timestamp (contextual.core/path :ts)}
{}
{:serialize-query-params true}))
(contextual.core/invoke compiled {:ts "2021-05-28 16:22:55.000+00 00"})
=> {:method "get", :url "?timestamp=2021-05-28%2016%3A22%3A55.000%2B00%20%20%2000"}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.