Current Folder
This commit is contained in:
1 parent
8b3382289b
commit
cfcada880d
4379 files changed
No files matched your search
+12
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user