Simplifying the request's options

This commit is contained in:
Jarzon 2017-02-07 15:35:29 -05:00
parent bbd80d4154
commit e2dae00af2

View File

@ -520,13 +520,14 @@ SteamCommunity.prototype.getGroupHistory = function(gid, page, callback) {
}; };
SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callback) { SteamCommunity.prototype.getAllGroupComments = function(gid, from, count, callback) {
var options = {}; var options = {
options.uri = "http://steamcommunity.com/comment/Clan/render/" + gid.getSteamID64() + "/-1/"; uri: "http://steamcommunity.com/comment/Clan/render/" + gid.getSteamID64() + "/-1/",
options.headers = { method: "POST",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" form: {
start: from,
count: count
}
}; };
options.method = "POST";
options.body = "start=" + from + "&count=" + count;
var self = this; var self = this;
this.httpRequest(options, function(err, response, body) { this.httpRequest(options, function(err, response, body) {