Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use querystring to encode search queries #3

Merged
merged 1 commit into from Apr 20, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/spotify/Spotify.js
@@ -1,4 +1,5 @@
var http = require('http');
var http = require('http'),
querystring = require('querystring');

/**
* Internal method for creating response hollabacks, should not be used on
Expand Down Expand Up @@ -57,7 +58,7 @@ module.exports = {
* @param {Function} The hollaback that'll be invoked once there's data
*/
search: function(opts, hollaback) {
var query = '/search/1/'+opts.type+'.json?q='+opts.query;
var query = '/search/1/'+opts.type+'.json?' + querystring.stringify({q: opts.query});

this.get(query, hollaback);
},
Expand Down