MCPcopy Create free account
hub / github.com/Effect-TS/effect / bytes

Method bytes

packages/ui/native/src/NativeHttpClient.ts:357–363  ·  view source on GitHub ↗
(chunk: string)

Source from the content-addressed store, hash-verified

355 }
356
357 private bytes(chunk: string): Uint8Array | HttpClientError.HttpClientError {
358 if (!this.binary) return (encoder ??= new TextEncoder()).encode(chunk)
359 const bytes = Base64.decode(chunk)
360 return Result.isSuccess(bytes)
361 ? bytes.success
362 : this.decodeError("Native sent invalid base64", bytes.failure)
363 }
364
365 /** The whole body, as native sent it. */
366 private get loaded(): Effect.Effect<string, HttpClientError.HttpClientError> {

Callers 15

flushMethod · 0.95
arrayBufferMethod · 0.95
layerWebhookFunction · 0.45
layerWebhookFunction · 0.45
webhook.test.tsFile · 0.45
layerWebhookFunction · 0.45
layerInteractivityFunction · 0.45
layerWebhookFunction · 0.45
makeFileInfoFunction · 0.45

Calls 3

decodeErrorMethod · 0.95
encodeMethod · 0.80
decodeMethod · 0.45

Tested by

no test coverage detected