-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
The query string is built incorrectly when the path contains a parameter #87
Description
Describe the bug
The URL is crafted incorrectly when the path already contains a query string and when additional parameters are added through the options.
Example: https://reqres.in/api/users?param1=value1?param2=value2
To Reproduce
Steps to reproduce the behavior:
url: http://whatever.com
path: /whatever?param1=value1
parameters: param2 as Key1 and value2 as Value1
Open the developer tools and select the network tab. Filter requests by XHR
Send the request by hitting the Send button.
Using the developer tools, analyze the HTTP request crafted by postwoman, especially the URL
The URL is https://reqres.in/api/users?param1=value1?param2=value2 which isn't valid. The query string isn't valid since the parameters are preceded twice by a question mark. The second parameter should be preceded by a "&" instead.
Expected behavior
The crafted URL should be https://reqres.in/api/users?param1=value1¶m2=value2.
In other words, if the path already contains a query string then the additional parameters specified through the parameter section must be correctly added.

