Skip to content

Instantly share code, notes, and snippets.

@heyAyushh
Last active June 21, 2019 11:39
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 heyAyushh/e3da9c6f5d66132d415f7e6e10796b86 to your computer and use it in GitHub Desktop.
Save heyAyushh/e3da9c6f5d66132d415f7e6e10796b86 to your computer and use it in GitHub Desktop.
invokes heyjumblr
// to be renamed /root/invoke/index.js
var axios = require("axios");
module.exports = function(context, req) {
context.log("JavaScript HTTP trigger function processed a request.");
thes = req.body.session.split("/");
thes = thes[4];
req.body.session = thes;
axios
.post("https://heyjumblr.azurewebsites.net/api/heyjumblr", req.body)
.then(response => {
context.res = {
body: response.data
};
context.done();
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment