/insert.js Secret
Created
December 20, 2016 01:24
JavaScript Frameworks
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
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(); | |
}); |
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
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