ipfs-http-client
Version:
A client library for the IPFS HTTP API
21 lines (16 loc) • 563 B
JavaScript
;
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;