Description
i am trying the litestar library for the api development. i found there are some stranges
doc: https://docs.litestar.dev/latest/usage/routing/parameters.html#query-parameters
from litestar import Litestar, get
@get("/", sync_to_thread=False)
def index(param: str) -> dict[str, str]:
return {"param": param}
app = Litestar(route_handlers=[index])
> curl http://127.0.0.1:8000/?param=foo
{"param":"foo"}
> curl http://127.0.0.1:8000/?param=bar
{"param":"bar"}
but the terminal show me when i follow the instruction
zsh: no matches found: http://localhost:8000?param=uiyhkjh
when i remove the query param, it showed
{"status_code":400,"detail":"Missing required query parameter 'param' for url http://localhost:8000/"}%
i have no idea on the issue, i just simply follow the guidelines, without any modification
URL to code causing the issue
No response
MCVE
Steps to reproduce
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
Screenshots
""
Logs
No response
Litestar Version
Version(major=2, minor=4, patch=1, release_level='final', serial=0)
Platform
Description
i am trying the litestar library for the api development. i found there are some stranges
doc: https://docs.litestar.dev/latest/usage/routing/parameters.html#query-parameters
but the terminal show me when i follow the instruction
zsh: no matches found: http://localhost:8000?param=uiyhkjhwhen i remove the query param, it showed
{"status_code":400,"detail":"Missing required query parameter 'param' for url http://localhost:8000/"}%i have no idea on the issue, i just simply follow the guidelines, without any modification
URL to code causing the issue
No response
MCVE
# Your MCVE code hereSteps to reproduce
Screenshots
""Logs
No response
Litestar Version
Version(major=2, minor=4, patch=1, release_level='final', serial=0)
Platform