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

Method json

packages/effect/src/http/HttpServerRequest.ts:858–864  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

856 }
857
858 get json(): Effect.Effect<Schema.Json, HttpServerError> {
859 return Effect.flatMap(this.text, (text) =>
860 Effect.try({
861 try: () => text === "" ? null : JSON.parse(text),
862 catch: (cause) => requestParseError(this, undefined, cause)
863 }))
864 }
865
866 get urlParamsBody(): Effect.Effect<UrlParams.UrlParams, HttpServerError> {
867 return Effect.flatMap(this.bytes, (bytes) =>

Callers

nothing calls this directly

Calls 2

requestParseErrorFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected