haskell-servant / haskell-servant/servant-js

Invalid requests with query flags

Open
#19 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.