|
@@ -122,12 +122,10 @@ class Request {
|
|
|
options.data = qs.stringify(options.data) || {}
|
|
options.data = qs.stringify(options.data) || {}
|
|
|
options.header = options.header || this.config.header
|
|
options.header = options.header || this.config.header
|
|
|
options.method = options.method || this.config.method
|
|
options.method = options.method || this.config.method
|
|
|
- console.log(options)
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
|
let next = true
|
|
let next = true
|
|
|
let _config = null
|
|
let _config = null
|
|
|
options.complete = (response) => {
|
|
options.complete = (response) => {
|
|
|
- console.log(response)
|
|
|
|
|
const statusCode = response.statusCode
|
|
const statusCode = response.statusCode
|
|
|
response.config = _config
|
|
response.config = _config
|
|
|
response.config.config = config
|
|
response.config.config = config
|
|
@@ -209,5 +207,4 @@ class Request {
|
|
|
return this.request(options, config)
|
|
return this.request(options, config)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-export default new Request()
|
|
|
|
|
-
|
|
|
|
|
|
|
+export default new Request()
|