drogonframework / drogonframework/drogon

HttpRequest::getParameters() missing query parameters if URL ends in path parameter

Open
#1,550 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
14.3k
Forks
1.4k
Avg merge
1d 13h
Merged PRs (30d)
14

Description

**Describe the bug**
If you register a HTTP method using an URL format like DELETE "/v2/hello/{path_param}" and call it like this:

DELETE /v2/hello/world?param1=abc

then httpRequest->parameters() returns a std::map containing only "path_param" = "world" and it is missing "param1" = "abc"

**Expected behavior**
The httpRequest->parameters() Method should return ALL parameters that were passed to the method. Or there should be a seperate API to query path params and query params.

drogon v1.8.4
Ubuntu 22.04.1

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.