haskell-servant / haskell-servant/servant-js
Invalid requests with query flags
- Dominant language
- Haskell
- Stars
- 23
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
We've recently encountered a couple of issues when generating Vanilla JS code.
Firstly, when a query flag is followed by something else, the generated request looks like this:
```js
... + '&flag'¶m=' + encodeURIComponent(param) ...
```
Instead of:
```js
... + '&flag' + '¶m=' + encodeURIComponent(param) ...
```
It is related to #11 and is even mentioned in a comment there. This part is easy to fix and I can propose a PR for it.
The second issue is that query flags are always added to the request (see valid code above), the actual argument of the client function is not even checked. This one is similar to #16, but I think it's better to have a separate issue for query flags processing.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.