Skip to content

Instantly share code, notes, and snippets.

@twhite96
Forked from yoav-lavi/getString.js
Created May 5, 2019 03:31
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 twhite96/afd81e87a6d6a00a40b457d3c99f3569 to your computer and use it in GitHub Desktop.
Save twhite96/afd81e87a6d6a00a40b457d3c99f3569 to your computer and use it in GitHub Desktop.
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: green; icon-glyph: file-code;
module.exports = async ({ url, headers = {} }) => {
const request = new Request(url);
request.method = methods.get;
request.headers = {
...headers
};
return await request.loadString();
};
const methods = {
get: "GET"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment