UNPKG

ipfs-api

Version:

A client library for the IPFS HTTP API

13 lines (9 loc) 203 B
'use strict' const http = require('http') const https = require('https') module.exports = (protocol) => { if (protocol.indexOf('https') === 0) { return https.request } return http.request }