Search code examples
resthttppostmanurlencode

Why does Postman format "null=null" into my REST endpoint?


I am making a REST GET call to our company's SharePoint. The "raw" endpoint in ascii is:

https://{myCompany}.sharepoint.com/sites/{mySite}/_api/web/getbytitle('myList')/Items?&filter=Title eq 234

Now, given the special characters, I would of expected a URL Encoding (percent encoding) to:

https://{myCompany}.sharepoint.com/sites/{mySite}/_api/web/getbytitle('myList')/Items%3F%26filter%3DTitle eq 234

However, Postman's code snippet gives me:

https://{myCompany}.sharepoint.com/sites/{mySite}/_api/web/getbytitle('myList')/Items?null=null&filter=Title eq 234

The request works, however I don't understand the formatting that is occurring and would apricate an explanation. Specifically, how it is:

Items?&filter=Title eq 234 = Items?null=null&filter=Title eq 234


Solution

  • Query Parameters

    This is definitely not a url encoding issue. This is another parameter added to the query string where the name is null and the associated value is null. Please take a screenshot of your Params tab in Postman. I have a suspicion it will look as follows

    Screenshot

    In which case just uncheck the parameter or remove it outright. This may have happened as a result of having a checked, but blank, parameter on that page.