HTTP tagged strings
Describe processable HTTP requests using tagged strings.
License
MIT
Installation
npm i -S http-tag-string
Examples
Provide a full HTTP request message:
const HTTP = "http://example.com" ; HTTP`POST /some/urlContent-Type: application/json {"info":"here it is..."}` ;
Provide the payload separately:
const HTTP = "http://example.com" ; const data = info: "here it is..."; HTTP`POST /some/urlContent-Type: application/json` data ;
Provide the payload as a readable stream:
const File = ;const HTTP = "http://example.com" ; HTTP`POST /some/urlContent-Type: application/json` File ;