MCPcopy Create free account
hub / github.com/desktop/desktop / request

Method request

app/src/lib/api.ts:1801–1820  ·  view source on GitHub ↗

Make an authenticated request to the client's endpoint with its token.

(
    endpoint: string,
    method: HTTPMethod,
    path: string,
    options: {
      body?: Object
      customHeaders?: Object
      reloadCache?: boolean
    } = {}
  )

Source from the content-addressed store, hash-verified

1799
1800 /** Make an authenticated request to the client's endpoint with its token. */
1801 private async request(
1802 endpoint: string,
1803 method: HTTPMethod,
1804 path: string,
1805 options: {
1806 body?: Object
1807 customHeaders?: Object
1808 reloadCache?: boolean
1809 } = {}
1810 ): Promise<Response> {
1811 return await request(
1812 endpoint,
1813 this.token,
1814 method,
1815 path,
1816 options.body,
1817 options.customHeaders,
1818 options.reloadCache
1819 )
1820 }
1821
1822 /**
1823 * Make an authenticated request to the client's endpoint with its token.

Callers 3

ghRequestMethod · 0.95
copilotRequestMethod · 0.95
reportErrorFunction · 0.80

Calls 1

requestFunction · 0.90

Tested by

no test coverage detected