We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
=
import uri, httpclient let data = { "name": "", "email": "aaa@example.com" } echo data.encodeQuery() >> name&email=aaa%40example.com var client = newHttpClient() client.headers = newHttpHeaders({"Content-Type": "application/x-www-form-urlencoded"}) discard client.post("/", body=data.encodeQuery())
If set data in request.body, Jester cannot parse query because query style is not same key=value
key=value
# in Jester echo request.params >> {"name&email": "aaa@example.com"} # expected output >> {"name": "", "email": "aaa@example.com"}
The text was updated successfully, but these errors were encountered:
https://github.com/dom96/jester/blob/master/jester/private/utils.nim#L23
I think it should be replaced like bellow
proc parseUrlQuery*(query: string, result: var Table[string, string]) {.deprecated: "use stdlib cgi/decodeData".} = for row in query.split("&"): if not row.contains("="): result[decodeUrl(row)] = "" else: let rowArr = row.split("=") let key = rowArr[0] let val = rowArr[1] result[decodeUrl(key)] = decodeUrl(val)
Sorry, something went wrong.
No branches or pull requests
If set data in request.body, Jester cannot parse query because query style is not same
key=value
The text was updated successfully, but these errors were encountered: