MCPcopy Index your code
hub / github.com/request/request / initParams

Function initParams

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

Source from the content-addressed store, hash-verified

22
23// organize params for patch, post, put, head, del
24function initParams (uri, options, callback) {
25 if (typeof options === 'function') {
26 callback = options
27 }
28
29 var params = {}
30 if (typeof options === 'object') {
31 extend(params, options, {uri: uri})
32 } else if (typeof uri === 'string') {
33 extend(params, {uri: uri})
34 } else {
35 extend(params, uri)
36 }
37
38 params.callback = callback || params.callback
39 return params
40}
41
42function request (uri, options, callback) {
43 if (typeof uri === 'undefined') {

Callers 3

requestFunction · 0.85
verbFuncFunction · 0.85
wrapRequestMethodFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…