Current Folder

This commit is contained in:
Luis Fernando Molina committed 2020-11-20 14:05:59 +01:00
1 parent 8b3382289b
commit cfcada880d
4379 files changed

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
module.exports = getResponse
function getResponse (opt, resp) {
if (!resp) return null
return {
statusCode: resp.statusCode,
headers: resp.headers,
method: opt.method,
url: opt.url,
// the XHR object in browser, http response in Node
rawRequest: resp.rawRequest ? resp.rawRequest : resp
}
}