danwrong/restler — Issue #65: Default query string parameters
Author: lancefisher
Created: 2012-01-20 08:46:51+00:00
State: open

In the readme, there is an example of using rest.Service() to create a wrapper for Twitter. It assigns to this.defaults.username and this.defaults.password.

I need to set a default querystring parameter. There are lots of APIs that take an AppId or ClientId as a querystring parameter on every call.

I tried this:
```javascript
this.defaults.query = { appid : appid };
```
Which does set the query property, but the mixin function overrides it when I call this.get('/theurl', options) in my wrapper function. where options has a query property.

Ideally, the mixin function would be applied to the query property as well as its parent options property.