ipfs-http-client
Version:
A client library for the IPFS HTTP API
22 lines (17 loc) • 594 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var configure = require('../lib/configure.js');
var toUrlSearchParams = require('../lib/to-url-search-params.js');
const createGetAll = configure.configure(api => {
const getAll = async (options = {}) => {
const res = await api.post('config/show', {
signal: options.signal,
searchParams: toUrlSearchParams.toUrlSearchParams({ ...options }),
headers: options.headers
});
const data = await res.json();
return data;
};
return getAll;
});
exports.createGetAll = createGetAll;