UNPKG

ipfs-http-client

Version:
21 lines (16 loc) 563 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var configure = require('./lib/configure.js'); var toUrlSearchParams = require('./lib/to-url-search-params.js'); const createCommands = configure.configure(api => { const commands = async (options = {}) => { const res = await api.post('commands', { signal: options.signal, searchParams: toUrlSearchParams.toUrlSearchParams(options), headers: options.headers }); return res.json(); }; return commands; }); exports.createCommands = createCommands;