Skip to content

Instantly share code, notes, and snippets.

@ParkSangGwon
Created January 29, 2016 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ParkSangGwon/b0388daf7e992e15cc14 to your computer and use it in GitHub Desktop.
Save ParkSangGwon/b0388daf7e992e15cc14 to your computer and use it in GitHub Desktop.
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