Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix($http): do not add trailing question #6342

Closed
wants to merge 1 commit into from
Closed

fix($http): do not add trailing question #6342

wants to merge 1 commit into from

Conversation

just-boris
Copy link
Contributor

Now if you pass empty object into params you will get url with unnecessary question mark.
It may cause some issues, like this stackoverflow question.
Moreover it makes unit test less readable, because that need to add redundant question to end of some $httpBackend expectations.

@mary-poppins
Copy link

Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.

  • Uses the issue template (#6342)

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@mary-poppins
Copy link

I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS.

Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match.

If you signed the CLA as a corporation, please let us know the company's name.

Thanks a bunch!

PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR.
PS2: If you are a Googler, please sign the CLA as well to simplify the CLA verification process.

@just-boris
Copy link
Contributor Author

I've recommit changes with another my email, which already signed. Check this again, please.

@mary-poppins
Copy link

CLA signature verified! Thank you!

Someone from the team will now triage your PR and it will be processed based on the determined priority (doc updates and fixes with tests are prioritized over other changes).

@tbosch tbosch self-assigned this Feb 21, 2014
@tbosch tbosch added this to the Backlog milestone Feb 21, 2014
@tbosch tbosch removed their assignment Feb 21, 2014
it('should not add question mark when params is empty', function() {
$httpBackend.expect('GET', '/url').respond('');
$http({url: '/url', params: {}, method: 'GET'});
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

semicolon missing. we'll start automatically validating this in the future. just fyi

@IgorMinar IgorMinar self-assigned this Feb 21, 2014
@IgorMinar
Copy link
Contributor

this is a very nice fix. thank you!

@IgorMinar IgorMinar closed this in c8e03e3 Feb 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants