http-rs / http-rs/tide

`cx.param` into a string doesn't handle url-decoding

Open
#281 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
5.1k
Forks
329
PR merge metrics
No merged PRs in 30d

Description

When using `cx.param` to extract strings, I expected it to handle URL decoding for me. However, it did not. I would up writing some [fairly complex code](https://github.com/nikomatsakis/mathema/blob/44b5c0f2111ad93084a4a07cef99335bf3e4a5a9/src/serve.rs#L48-L50) to deal with this. In general, I would expect this to be the default, with some way to request the "raw string" if I really wanted to get that, but at least there should be some super ergonomic way to "url-decode" your request parameters.

## Question

Is this by design? Am I overlooking a simple way to do url-decoding?

## Additional context

This is part of a flashcard app. The incoming request parameters are sometimes in other languages, so they are url-encoded utf-8.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.