Comparing version 0.0.3-1 to 0.0.3-2
@@ -35,3 +35,3 @@ var net = require('net'); | ||
var req = http.request({ | ||
method: 'POST', | ||
method: files ? 'POST' : 'GET', | ||
host: host, | ||
@@ -42,3 +42,3 @@ port: port, | ||
'User-Agent': '/node-'+package.name+'/'+package.version+'/', | ||
'Content-Type': contentType || 'application/octet-stream' | ||
'Content-Type': contentType | ||
} | ||
@@ -180,2 +180,7 @@ }, function(res) { | ||
links: argCommand('object/links') | ||
}, | ||
swarm: { | ||
peers: command('swarm/peers'), | ||
connect: argCommand('swarm/peers') | ||
} | ||
@@ -182,0 +187,0 @@ } |
@@ -1,10 +0,5 @@ | ||
var ipfs = require('./')('localhost', 5001); | ||
var ipfs = require('./')('192.168.1.142', 5001); | ||
ipfs.add('/Users/mappum/hello.txt', function(err, data) { | ||
if(err) return console.error(err) | ||
console.log(data) | ||
}); | ||
ipfs.cat('Qmbvkmk9LFsGneteXk3G7YLqtLVME566ho6ibaQZZVHaC9', function(err, data) { | ||
ipfs.add(function(err, data) { | ||
console.log(err, data) | ||
}); |
{ | ||
"name": "ipfs-api", | ||
"version": "0.0.3-1", | ||
"version": "0.0.3-2", | ||
"description": "An client library for the IPFS API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
5072