Skip to content
New issue

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

Unirest does not preserve query string in Url #130

Open
thehappybug opened this issue Dec 19, 2017 · 2 comments
Open

Unirest does not preserve query string in Url #130

thehappybug opened this issue Dec 19, 2017 · 2 comments

Comments

@thehappybug
Copy link

I ran into an issue where I needed to send arrays in query strings but encoded in a different style than is common in PHP. Example: first=value&arr=foo+bar&arr=baz.

However, since Unirest is rebuilding the Url before sending the request, the query string is rewritten and only one of the values of the array "arr" is kept.

I am attaching the line which seems to be the cause of this issue.

$query = '?' . http_build_query(self::getArrayFromQuerystring($query));

Is there a workaround or a fix for this?

@ad-git
Copy link

ad-git commented Feb 24, 2018

My old pull request solve this issue and other, see: #114

@prasad83
Copy link

I got hit with this bug and submitted working fix #133

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

No branches or pull requests

3 participants