MCPcopy
hub / github.com/request/request / request

Function request

index.js:42–54  ·  view source on GitHub ↗
(uri, options, callback)

Source from the content-addressed store, hash-verified

40}
41
42function 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
56function verbFunc (verb) {
57 var method = verb.toUpperCase()

Callers 15

verbFuncFunction · 0.85
runTestFunction · 0.85
test-basic-auth.jsFile · 0.85
runTestFunction · 0.85
test-unix.jsFile · 0.85
test-gzip.jsFile · 0.85
test-aws.jsFile · 0.85
runTestsFunction · 0.85
test-errors.jsFile · 0.85
runTestFunction · 0.85
test-emptyBody.jsFile · 0.85

Calls 2

initParamsFunction · 0.85
paramsHaveRequestBodyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…