Skip to content

fraftDeclarative HTTP for Node.js

Define requests and data transforms in YAML or JSON. Execute them with a single method call.

Quick Look ​

yaml
# api.yaml
version: 1
baseUrl: https://jsonplaceholder.typicode.com

requests:
  completedTodos:
    path: /todos
    transform:
      - filter: { field: completed, op: eq, value: true }
      - pick: [id, title]
js
import { FraftClient } from '@go-denki/fraft';

const client = new FraftClient({ config: 'api.yaml' });
const todos = await client.run('completedTodos');
// [ { id: 1, title: '...' }, ... ]

Released under the MIT License.