MCPcopy Index your code
hub / github.com/modelcontextprotocol/typescript-sdk / makeRequest

Function makeRequest

src/client/middleware.ts:40–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 next => {
39 return async (input, init) => {
40 const makeRequest = async (): Promise<Response> => {
41 const headers = new Headers(init?.headers);
42
43 // Add authorization header if tokens are available
44 const tokens = await provider.tokens();
45 if (tokens) {
46 headers.set('Authorization', `Bearer ${tokens.access_token}`);
47 }
48
49 return await next(input, { ...init, headers });
50 };
51
52 let response = await makeRequest();
53

Callers 1

withOAuthFunction · 0.70

Calls 1

tokensMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…