MCPcopy Index your code
hub / github.com/coder/code-server / request

Method request

src/node/update.ts:84–98  ·  view source on GitHub ↗
(uri: string)

Source from the content-addressed store, hash-verified

82 }
83
84 private async request(uri: string): Promise<Buffer> {
85 const response = await this.requestResponse(uri)
86 return new Promise((resolve, reject) => {
87 const chunks: Buffer[] = []
88 let bufferLength = 0
89 response.on("data", (chunk) => {
90 bufferLength += chunk.length
91 chunks.push(chunk)
92 })
93 response.on("error", reject)
94 response.on("end", () => {
95 resolve(Buffer.concat(chunks, bufferLength))
96 })
97 })
98 }
99
100 private async requestResponse(uri: string): Promise<http.IncomingMessage> {
101 let redirects = 0

Callers 4

_getUpdateMethod · 0.95
addSessionMethod · 0.80
openInExistingInstanceFunction · 0.80

Calls 2

requestResponseMethod · 0.95
resolveFunction · 0.85

Tested by

no test coverage detected