(uri, options, callback)
| 40 | } |
| 41 | |
| 42 | function request (uri, options, callback) { |
| 43 | if (typeof uri === 'undefined') { |
| 44 | throw new Error('undefined is not a valid uri or options object.') |
| 45 | } |
| 46 | |
| 47 | var params = initParams(uri, options, callback) |
| 48 | |
| 49 | if (params.method === 'HEAD' && paramsHaveRequestBody(params)) { |
| 50 | throw new Error('HTTP HEAD requests MUST NOT include a request body.') |
| 51 | } |
| 52 | |
| 53 | return new request.Request(params) |
| 54 | } |
| 55 | |
| 56 | function verbFunc (verb) { |
| 57 | var method = verb.toUpperCase() |
no test coverage detected
searching dependent graphs…