mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-05 23:20:09 +08:00
Simplifying the request's options
This commit is contained in:
parent
bbd80d4154
commit
e2dae00af2
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user