Skip to content

Commit 5646ced

Browse files
committed
trying to switch to post requests for string data
1 parent 7d05161 commit 5646ced

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

push

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,18 @@ else {
3131
}
3232

3333
function go() {
34-
var path = '/input/' + options.public_key +
35-
'?private_key=' + options.private_key +
36-
'&' + options.field_name + '=' + options.data;
34+
var path = '/input/' + options.public_key;
3735
log(options.url+path)
38-
http.get({ host: options.url, path: path}, function(response) {
36+
var postOptions = {
37+
'private_key': options.private_key
38+
}
39+
postOptions[options.field_name] = options.data;
40+
http.request({
41+
host: options.url,
42+
path: path,
43+
method: 'POST',
44+
body: postOptions
45+
}, function(response) {
3946
response.on('error', function() {
4047
console.log('error!')
4148
process.exit(1)

0 commit comments

Comments
 (0)