@arkstack/http
v0.14.21
Published
HTTP module for Arkstack, providing framework-agnostic request and response primitives.
Maintainers
Readme
@arkstack/http
HTTP module for Arkstack, providing framework-agnostic request and response primitives.
import { Request, Response } from '@arkstack/http';
const request = Request.from({
headers: {
authorization: 'Bearer token',
},
method: 'GET',
path: '/account',
});
const token = request.bearerToken();
const response = new Response().status(200).json({ ok: true });Runtime-specific handlers should continue to use their native framework request and response objects. Driver middleware can translate those objects into @arkstack/http wrappers when calling shared services.
