Skip to content

Instantly share code, notes, and snippets.

@jamesmontemagno jamesmontemagno/insert.js Secret
Created Dec 20, 2016

Embed
What would you like to do?
JavaScript Frameworks
table.insert(function (context) {
var item = context.item;
var body = JSON.stringify(item);
var request = new http.ClientRequest({
hostname: "fa.azurewebsites.net",
port: 80,
path: "/api/WCSendGrid?code=YourCode",
method: "POST",
headers: {
"Content-Type": "application/json",
"Content-Length": Buffer.byteLength(body)
}
});
request.end(body);
return context.execute();
});
request.post("https://fa.azurewebsites.net/api/WCSendGrid?code=YourCode",
{body: context.item, json:true});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.