AVA-http is a lightweight async HTTP request wrapper built on top of Request-Promise, designed originally for AVA test runners but usable anywhere. Version 1.0.0 targets Node >=4 with ESM support. It provides simplified GET, POST, PUT, DELETE methods that return only the response body on success, with companion *Response variants that always return the full response object. Compared to raw request-promise, it reduces boilerplate by defaulting to JSON parsing and providing a cleaner API for quick HTTP assertions.
npm install ava-httpNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic GET and POST requests using ava-http inside an AVA test file.
Wrap calls in try/catch and inspect response properties (statusCode, body) on failure.
Use the *Response variants: http.getResponse, http.postResponse, etc.
Switch to got or node-fetch with equivalent APIs.
Either use `form` and let the library set headers, or set headers manually and omit `form`.
Run `npm install --save-dev ava-http` (or `--save` for production) and ensure node_modules is correct.
Use `import http from 'ava-http'` not `import { http } from 'ava-http'`.