I am using the API to access IPFS and access is OK with a status code 200 but the API call fails. Here is the code:
this.IpfsAPI = IpfsAPI('162.243.237.41', '5001', {protocol: 'http'})
var zstr = 'hello world from Zillerium2'
this.IpfsAPI.add(new Buffer(zstr), function (err, res){
console.log("hello");
if(err || !res) return console.error("ipfs add error", err, res);
else{
The call returns the following - does anyone have any experience or idea about the X-Stream error:
Request URL:http://162.243.237.41:5001/api/v0/object/get?
arg=QmQHoSC2We7F3kskZExSpjUbwCVWDnaW1VQT44b14n5rLG&stream -channels=true
Request Method:POST
Status Code:200 OK
Remote Address:162.243.237.41:5001
Response Headers
view source
Access-Control-Allow-Credentials:true
Access-Control-Allow-Headers:X-Stream-Output, X-Chunked-Output, X- Content-Length
Access-Control-Allow-Origin:http://jenbil.com:3000
Access-Control-Expose-Headers:X-Stream-Output, X-Chunked-Output, X-Content-Length
Content-Type:application/json
Date:Sat, 06 May 2017 15:00:20 GMT
Server:go-ipfs/0.4.8
Trailer:X-Stream-Error
Transfer-Encoding:chunked
Vary:Origin
Request Headers
view source
Accept:*/*
Accept-Encoding:gzip, deflate
Accept-Language:en-GB,en-US;q=0.8,en;q=0.6
Connection:keep-alive
Content-Length:0
Host:162.243.237.41:5001
Origin:http://jenbil.com:3000
Referer:http://jenbil.com:3000/
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Query String Parameters
view source
view URL encoded
arg:QmQHoSC2We7F3kskZExSpjUbwCVWDnaW1VQT44b14n5rLG
stream-channels:true