|
@ -1,6 +1,7 @@ |
|
|
import bytes from 'bytes'; |
|
|
import bytes from 'bytes'; |
|
|
import chalk from 'chalk'; |
|
|
import chalk from 'chalk'; |
|
|
import getFiles from './get-files'; |
|
|
import getFiles from './get-files'; |
|
|
|
|
|
import ua from './ua'; |
|
|
import hash from './hash'; |
|
|
import hash from './hash'; |
|
|
import retry from 'async-retry'; |
|
|
import retry from 'async-retry'; |
|
|
import Agent from './agent'; |
|
|
import Agent from './agent'; |
|
@ -280,6 +281,7 @@ export default class Now extends EventEmitter { |
|
|
_fetch (_url, opts = {}) { |
|
|
_fetch (_url, opts = {}) { |
|
|
opts.headers = opts.headers || {}; |
|
|
opts.headers = opts.headers || {}; |
|
|
opts.headers.authorization = `Bearer ${this._token}`; |
|
|
opts.headers.authorization = `Bearer ${this._token}`; |
|
|
|
|
|
opts.headers['user-agent'] = ua; |
|
|
return this._agent.fetch(_url, opts); |
|
|
return this._agent.fetch(_url, opts); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|