node-appwrite
Advanced tools
Comparing version
@@ -12,3 +12,3 @@ const URL = require('url').URL; | ||
'content-type': '', | ||
'x-sdk-version': 'appwrite:nodejs:2.2.2', | ||
'x-sdk-version': 'appwrite:nodejs:2.2.3', | ||
'X-Appwrite-Response-Format' : '0.8.0', | ||
@@ -108,3 +108,3 @@ }; | ||
async call(method, path = '', headers = {}, params = {}) { | ||
async call(method, path = '', headers = {}, params = {}, responseType = 'json') { | ||
if(this.selfSigned) { // Allow self signed requests | ||
@@ -144,3 +144,4 @@ process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0; | ||
data: (method.toUpperCase() === 'GET' || contentType.startsWith('multipart/form-data')) ? formData : params, | ||
json: (contentType.startsWith('application/json')) | ||
json: (contentType.startsWith('application/json')), | ||
responseType: responseType | ||
}; | ||
@@ -186,2 +187,2 @@ try { | ||
module.exports = Client; | ||
module.exports = Client; |
@@ -30,3 +30,3 @@ const Service = require('../service.js'); | ||
'quality': quality | ||
}); | ||
}, 'arraybuffer'); | ||
} | ||
@@ -58,3 +58,3 @@ | ||
'quality': quality | ||
}); | ||
}, 'arraybuffer'); | ||
} | ||
@@ -81,3 +81,3 @@ | ||
'url': url | ||
}); | ||
}, 'arraybuffer'); | ||
} | ||
@@ -109,3 +109,3 @@ | ||
'quality': quality | ||
}); | ||
}, 'arraybuffer'); | ||
} | ||
@@ -137,3 +137,3 @@ | ||
'height': height | ||
}); | ||
}, 'arraybuffer'); | ||
} | ||
@@ -175,3 +175,3 @@ | ||
'background': background | ||
}); | ||
}, 'arraybuffer'); | ||
} | ||
@@ -203,3 +203,3 @@ | ||
'download': download | ||
}); | ||
}, 'arraybuffer'); | ||
} | ||
@@ -206,0 +206,0 @@ } |
@@ -141,3 +141,3 @@ const Service = require('../service.js'); | ||
{ | ||
}); | ||
}, 'arraybuffer'); | ||
} | ||
@@ -184,3 +184,3 @@ | ||
'output': output | ||
}); | ||
}, 'arraybuffer'); | ||
} | ||
@@ -206,3 +206,3 @@ | ||
{ | ||
}); | ||
}, 'arraybuffer'); | ||
} | ||
@@ -209,0 +209,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"license": "BSD-3-Clause", | ||
@@ -18,2 +18,2 @@ "main": "index.js", | ||
} | ||
} | ||
} |
123373
0.17%2212
0.09%