Skip to content

pfrazee/http-template-literal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

http-template-literal

Make HTTP requests the way TBL intended.

const http = require('http-template-literal')

var res = await http`
  GET https://httpbin.org/get HTTP/1.1
  Accept: application/json
`
console.log('Request one:', res.body)

var res = await http`
  POST https://httpbin.org/post HTTP/1.1
  Content-Type: application/json

  ${JSON.stringify({
    hello: 'world',
    awesome: true
  })}
`
console.log('Request two:', res.body)

About

Make HTTP requests the way TBL intended.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published