Last active
August 29, 2015 14:23
-
-
Save ajcrites/3aff287fa6aa5b33c097 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import request from "request-promise"; | |
import {readFile, writeFile} from "mz/fs"; | |
let uri = "http://localhost:8917"; | |
async () => { | |
let body = await request.get({uri}); | |
await writeFile(__dirname + "/foo", body); | |
let contents = await readFile(__dirname + "/foo"); | |
await writeFile(__dirname + "/bar", contents.toString().split("").reverse().join("")); | |
let res = await request({uri, method: "POST"}); | |
console.log(res); | |
}() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment