postmanlabs / newman

Newman is a command-line collection runner for Postman
https://www.postman.com
Apache License 2.0
6.83k stars 1.15k forks source link

Newman Dislikes "+" Signs in Params #260

Closed airios closed 8 years ago

airios commented 8 years ago

I'm generating a signature to send along to one of my requests (which sometimes includes a plus + sign). My request looks something like this:

http://{{host}}/api/v1/clients?signature={{signature}}

I am using a script to generate the signature and create the data.json file to send along to Newman. I can verify that the signature is getting generated properly both on the server and client. However, when I go to run Newman, I notice that the signature param is coming through without + signs and instead are replaced with spaces. This of course is causing all of my requests to 404.

czardoz commented 8 years ago

@airios, the "+" character has special meaning when used in query parameters.

From RFC 1630:

Within the query string, the plus sign is reserved as shorthand notation for a space. Therefore, real plus signs must be encoded. This method was used to make query URIs easier to pass in systems which did not allow spaces.

Have you tried percent-encoding the query string?

airios commented 8 years ago

I have not, but will attempt.

airios commented 8 years ago

Works. Seems to be cool with Newman too. Thanks!