Created
January 29, 2016 00:58
-
-
Save ParkSangGwon/b0388daf7e992e15cc14 to your computer and use it in GitHub Desktop.
This file contains 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 testJandi = function () { | |
var formData = { | |
body: '[[PizzaHouse]](http://url_to_text) You have a new Pizza order.', //Body text (Required) | |
connectColor: '#FAC11B', //Hex code color of attachment bar | |
connectInfo: [{ | |
title: 'Topping', //1st attachment area title | |
description: 'Pepperoni' //1st attachment description | |
}, | |
{ | |
title: 'Location', //2nd attachment area title | |
description: 'Empire State Building, 5th Ave, New York', //2nd attachment description | |
imageUrl: 'http://url_to_text' //Image URL | |
}] | |
} | |
var options = { | |
url: '여러분의 WebHookUrl', | |
headers: { | |
"Content-type": "application/json", | |
"Accept": "application/vnd.tosslab.jandi-v2+json" | |
}, | |
form: formData | |
}; | |
request.post(options, function (err, response, body) { | |
if (err) { | |
console.error('err: ', err); | |
return; | |
} | |
console.log('body: ', body); | |
return; | |
}); | |
} | |
testJandi(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment