(options, cb)
| 40 | } |
| 41 | |
| 42 | function request (options, cb) { |
| 43 | // Allow string URL |
| 44 | if (typeof options === 'string') options = { url: options } |
| 45 | const method = (options.method || 'GET').toLowerCase() |
| 46 | return fetchRequest(method, options, cb) |
| 47 | } |
| 48 | |
| 49 | request.get = (options, cb) => fetchRequest('get', options, cb) |
| 50 | request.put = (options, cb) => fetchRequest('put', options, cb) |
no test coverage detected