Skip to content

Instantly share code, notes, and snippets.

@jamesmontemagno
Created December 20, 2016 01:24
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 jamesmontemagno/fa451efa223e13a27da72e05f6e07757 to your computer and use it in GitHub Desktop.
Save jamesmontemagno/fa451efa223e13a27da72e05f6e07757 to your computer and use it in GitHub Desktop.
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