aurelia / http-client

A simple, restful, message-based wrapper around XMLHttpRequest.
MIT License
62 stars 59 forks source link

Pre-existing parameters in RequestMessage.buildFullUrl fails to properly include the parameter object #117

Closed rebrown547 closed 8 years ago

rebrown547 commented 8 years ago

Breeze Query Fails when a parameter object is included. When there are existing parameters, the parameter prefix should be '&' not '?'.

In 1.0.0-Beta.1 the following code RequestMessage.prototype.buildFullUrl should be : if (this.params) { var qs = _aureliaPath.buildQueryString(this.params); url = qs ? url + (this.url.indexOf('?') < 0 ? '?' : '&') + qs : url; }

gregoryagu commented 8 years ago

If you are using Breeze, you don't need to use the http-client. Have you tried the Aurelia-Breeze plugin? I use it, and it works great.

EisenbergEffect commented 8 years ago

Is this still an issue? If so, seems like a great opportunity for a community PR to address it. Shouldn't be too hard. The source code for the fix is above...so just need someone who wants to contribute it.

gregoryagu commented 8 years ago

I addressed this issue and sent pull request.

EisenbergEffect commented 8 years ago

Excellent. I just saw it come through. It will go out no later than Tuesday.