NodeHttpServerRequest.toServerResponseconstrepos/effect/packages/platform-node/src/NodeHttpServerRequest.ts:30(self: HttpServerRequest): Http.ServerResponseReturns the underlying Node ServerResponse for a platform Node
HttpServerRequest, evaluating the stored response thunk when the response
was created lazily.
accessors
export const const toServerResponse: (
self: HttpServerRequest
) => Http.ServerResponse
Returns the underlying Node ServerResponse for a platform Node
HttpServerRequest, evaluating the stored response thunk when the response
was created lazily.
toServerResponse = (self: HttpServerRequest(parameter) self: {
source: object;
url: string;
originalUrl: string;
method: HttpMethod;
cookies: ReadonlyRecord<string, string>;
multipart: Effect.Effect<Multipart.Persisted, Multipart.MultipartError, Scope.Scope | FileSystem.FileSystem | Path.Path>;
multipartStream: Stream.Stream<Multipart.Part, Multipart.MultipartError>;
upgrade: Effect.Effect<Socket.Socket, HttpServerError>;
modify: (options: { readonly url?: string; readonly headers?: Headers.Headers; readonly remoteAddress?: Option.Option<string> }) => HttpServerRequest;
headers: Headers.Headers;
remoteAddress: Option.Option<string>;
json: Effect.Effect<Schema.Json, E>;
text: Effect.Effect<string, E>;
urlParamsBody: Effect.Effect<UrlParams.UrlParams, E>;
arrayBuffer: Effect.Effect<ArrayBuffer, E>;
stream: Stream.Stream<Uint8Array, E>;
toString: () => string;
toJSON: () => unknown;
}
self: HttpServerRequest): import HttpHttp.type Http.ServerResponse = /*unresolved*/ anyServerResponse => {
const const res: anyres = (self: HttpServerRequest(parameter) self: {
source: object;
url: string;
originalUrl: string;
method: HttpMethod;
cookies: ReadonlyRecord<string, string>;
multipart: Effect.Effect<Multipart.Persisted, Multipart.MultipartError, Scope.Scope | FileSystem.FileSystem | Path.Path>;
multipartStream: Stream.Stream<Multipart.Part, Multipart.MultipartError>;
upgrade: Effect.Effect<Socket.Socket, HttpServerError>;
modify: (options: { readonly url?: string; readonly headers?: Headers.Headers; readonly remoteAddress?: Option.Option<string> }) => HttpServerRequest;
headers: Headers.Headers;
remoteAddress: Option.Option<string>;
json: Effect.Effect<Schema.Json, E>;
text: Effect.Effect<string, E>;
urlParamsBody: Effect.Effect<UrlParams.UrlParams, E>;
arrayBuffer: Effect.Effect<ArrayBuffer, E>;
stream: Stream.Stream<Uint8Array, E>;
toString: () => string;
toJSON: () => unknown;
}
self as any).response
return typeof const res: anyres === "function" ? const res: anyres() : const res: anyres
}