pls is an asynchronous, simple, promise-based HTTP request API
const pls = require("pls")
pls.get("https://jsonplaceholder.typicode.com/todos/1")
.then(response=> response.parse()) // returns reponse promise
.then(body=> console.log(body)) // prints response to console
.catch(error=> console.log(error)) // log error if there is an errorconst pls = require("pls")
pls.post("https://jsonplaceholder.typicode.com/posts", "Hello World!", {"Content-type": "text/plain"})
.then(response => response.parse()) // returns reponse promise
.then(body => console.log(body)) // prints response to console
.catch(error => console.log(error)) // log error if there is an errorpls.get(endpoint: string): Promise<Response>pls.post(endpoint: string, payload: any, headers: http.OutgoingHttpHeaders): Promise<Response>Response.parse(): Promise<any>