(url, opt)
| 5 | module.exports = app => { |
| 6 | class CustomHttpClient extends app.HttpClient { |
| 7 | request(url, opt) { |
| 8 | return new Promise(resolve => { |
| 9 | assert(/^http/.test(url), 'url should start with http, but got ' + url); |
| 10 | resolve(); |
| 11 | }).then(() => { |
| 12 | return super.request(url, opt); |
| 13 | }); |
| 14 | } |
| 15 | |
| 16 | curl(url, opt) { |
| 17 | return this.request(url, opt); |
no test coverage detected