pagekit / vue-resource

The HTTP client for Vue.js
MIT License
10.09k stars 1.6k forks source link

Conflict between query parameter name and GET /{id} #712

Open et1421 opened 5 years ago

et1421 commented 5 years ago

Steps to reproduce

On Chrome Version 1.5.1

When using the function.query() with a parameter named the same as the scalar URL variable (this.$resource('someItem{/id}');) the wrong URL is called.

What is Expected?

When calling the query function with : theResource.query({id: "3"}); The URL should be called without the id in the path and with the query parameters.

The URL : /fakeapiurl/?id=3

What is actually happening?

The URL for the scalar is called instead, therefore returning the wrong values.

The URL: /fakeapiurl/3