MCPcopy
hub / github.com/axios/axios / get

Method get

lib/core/AxiosHeaders.js:141–169  ·  lib/core/AxiosHeaders.js::AxiosHeaders.get
(header, parser)

Source from the content-addressed store, hash-verified

139 }
140
141 get(header, parser) {
142 header = normalizeHeader(header);
143
144 if (header) {
145 const key = utils.findKey(this, header);
146
147 if (key) {
148 const value = this[key];
149
150 if (!parser) {
151 return value;
152 }
153
154 if (parser === true) {
155 return parseTokens(value);
156 }
157
158 if (utils.isFunction(parser)) {
159 return parser.call(this, value, key);
160 }
161
162 if (utils.isRegExp(parser)) {
163 return parser.exec(value);
164 }
165
166 throw new TypeError(class="st">'parser must be boolean|regexp|function');
167 }
168 }
169 }
170
171 has(header, matcher) {
172 header = normalizeHeader(header);

Callers 15

getSetCookieMethod · 0.95
getContributorsFunction · 0.80
client.jsFile · 0.80
factoryFunction · 0.80
getFetchFunction · 0.80
getTunnelingAgentFunction · 0.80
getAdapterFunction · 0.80

Calls 2

normalizeHeaderFunction · 0.85
parseTokensFunction · 0.85

Tested by 2

requestWithConfigFunction · 0.64
requestWithConfigFunction · 0.64