insomnia
insomnia copied to clipboard
Keep equal sign for empty query parameters
Hi :) I've been using Insomnia for over 2 years now, and it's such a great piece of software. However, I am currently facing an issue that stops me from using on a particular project.
I need to call a legacy web server that has a very not standard way of dealing with query parameters. There is only one endpoint, and all parameters of a request, including the nature of the request itself is passed via query parameters. Some endpoints require query parameters with no value. However the server doesn't recognize the parameters when they are sent without an equal sign.
Example
This works
/terminologies?query=getconcept&terminologyid=indexation&conceptId=
But this yields a 400 Bad Request
/terminologies?query=getconcept&terminologyid=indexation&conceptId
The issue is Insomnia strips the equal sign for empty query parameters.
It has been mentioned here by another user, who has since then been able to solve the problem by updating the server. But I have no control whatsoever on the server in that case.
I think the best solution would be to have a checkbox somewhere to control this behavior.
Alternatively, is there any workaround to prevent Insomnia from doing that? I've tried passing =""
and =''
but the server is very picky and won't accept that either.
Update: I have found a workaround for my particular use case. When putting the equal sign in the parameter name itself in the Query
tab, the server picks it up as if it wasn't part of the parameter name, even though it is url-encoded.
However this only works because of the way this particular application handles query parameters. I believe the feature request is still relevant, although much less urgent :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi @gbogard Do you see the same behavior with our latest release located here: https://github.com/Kong/insomnia/releases/tag/core%402022.6.0-beta.4
I just had this problem and can verify it is present in 2022.6.0-beta.4 Equals sign is getting stripped from empty parameters. This causes a problem in ASP .NET sites as each parameter gets treated as a "keyless" parameter and each one gets concatenated to a query param with a null key. https://stackoverflow.com/questions/3130541/access-query-string-parameters-with-no-values-in-asp-net
ASP .NET +1
你好@gbogard 您是否在我们位于此处的最新版本中看到相同的行为:https ://github.com/Kong/insomnia/releases/tag/core%402022.6.0-beta.4
2022.7.6 version also does Insomnia fail but curl work, Server use ASP .NET