Skip to content

RequestBuilder::build creates a url with extra '& at the end#497

Merged
Madoshakalaka merged 2 commits intoranile:masterfrom
hmacias-avaya:requestbuilder-ampersand
Mar 25, 2026
Merged

RequestBuilder::build creates a url with extra '& at the end#497
Madoshakalaka merged 2 commits intoranile:masterfrom
hmacias-avaya:requestbuilder-ampersand

Conversation

@hmacias-avaya
Copy link
Copy Markdown
Contributor

When doing something like

let url = "http://something.com/get?param1=value1";
let request = Request::get(url).build().unwrap();

the request created will target http://something.com/get?param1=value1& and not the original url, http://something.com/get?param1=value1 (note there is an '&' added).

I'm providing a test and the fix for it.
Sorry I couldn't figure out how to put the test where it should be going (somewhere in http?)

…ring the resulting url does not end up with an extra trailing '&'
Copy link
Copy Markdown
Collaborator

@Madoshakalaka Madoshakalaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Good fixes. I tidied up the tests.

@Madoshakalaka Madoshakalaka merged commit 9fe4c08 into ranile:master Mar 25, 2026
20 checks passed
@hmacias-avaya hmacias-avaya deleted the requestbuilder-ampersand branch March 25, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants