Created
July 7, 2015 03:59
-
-
Save korrio/afb30935f65658b1006e to your computer and use it in GitHub Desktop.
noti request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var titile = "คุณได้รับข้อความใหม่"; | |
var sender = {id: 6,name:"Hey"}; | |
var message = "นาย " + sender.name + " ได้กดถูกใจคุณ"; | |
var receiverId = 3082; | |
var notiType = 100; | |
request({ | |
//uri: "http://api.vdomax.com/noti/", | |
uri: "http://chat.vdomax.com/noti/index.php?"+ | |
"title="+titile+ | |
"&m="+message+ | |
"&f="+sender.id+ | |
"&n="+sender.name+ | |
"&t="+receiverId+ | |
"&type="+notiType, | |
method: "GET", | |
timeout: 20000, | |
followRedirect: true, | |
maxRedirects: 10, | |
/* | |
qs: { | |
title: "VDOMax", | |
m: message, | |
f: sender.id || 0, | |
n: sender.name || "", | |
t: receiverId, | |
type: notiType | |
} | |
*/ | |
}, function(error, response, body) { | |
// console.log(error); | |
console.log(body); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment