Advertisement
Guest User

Untitled

a guest
May 30th, 2018
824
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fetch(inputData.urltofetch)
  2.   .then(function(response) {
  3.     return response.text();
  4.   })
  5.   .then(function(body) {
  6.     var title = body.split('<title>')[1].split('</title>')[0]
  7.     var output = {id: 1234, rawHTML: title};
  8.     callback(null, output);
  9.   })
  10.   .catch(callback);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement