Skip to content

tessin/node-tessin-request

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

📮 Promise based, message oriented API for primarily JSON over HTTP/HTTPS

const request = require("@tessin/request");

const res = await request({ url: "..." }); // GET ...

console.log(res.statusCode); // number
console.log(res.statusMessage); // string
console.log(res.headers); // {[key: string]: string}

// if "Content-Type" is "application/json" then
// content equals JSON.parse(content)
// otherwise typeof content is "string"
const content = res.content;

console.log(typeof content, content);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published