This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
fix($http): question mark added to URL if params are empty #6343
Closed
Description
STEPS
- Create a request using $http service and provide: a) an URL without any params nor question mark b) an empty params set {} (people fallback to some sort of default to avoid errors)
ACTUAL: Notice in developer tools the URL has actually a question mark in it
EXPECTED: As long as we don't have an iterable array/object with a length bigger or equal to 1, we should not affect the URL.
Source code: https://github.com/angular/angular.js/blob/master/src/ng/http.js#L1013-L1029 (please note the first line from buildURL: "if (!params) return url;") ).
originally noticed by Marius Radvan.
Metadata
Metadata
Assignees
Labels
No labels