A lightweight frontend library (v1.1.10, stable, semantic-release) for generating REST API request metadata (method, URI, params, data, delay) without making actual HTTP requests. Designed for Vue/Nuxt, it supports configurable resources with optional base URL, prefix, version, routing templates, and an authorization key. Its key differentiators: declarative resource configuration, custom methods (cget, load, save, etc.), and a built-in query delay feature for UI responsiveness testing. Not a HTTP client; use alongside fetch/axios.
npm install rest-api-pathNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to instantiate Api with resource configuration, generate GET and POST request objects without making HTTP calls.
Use api.res('users').load(null, '/users') instead of get() when no ID is needed.Pass an object: { default: { host: '...' }, users: { ... } }.Use the returned object as request config for a separate HTTP client (axios, fetch).
Ensure the resource config includes a 'routing' object with the method key (e.g., get: '{id}').Pass an object with a 'default' key hosting base configuration: new Api({ default: { host: '...' } }).Add the resource to the config object: { default: {...}, users: {...} }.No dependency data recorded yet.