Skip to main content Link Search Menu Expand Document (external link)

ClientResponse overview

Added in v1.0.0


Table of contents


accessors

arrayBuffer

Signature

export declare const arrayBuffer: <E, R>(
  effect: Effect.Effect<ClientResponse, E, R>
) => Effect.Effect<ArrayBuffer, Error.ResponseError | E, Exclude<R, Scope.Scope>>

Added in v1.0.0

formData

Signature

export declare const formData: <E, R>(
  effect: Effect.Effect<ClientResponse, E, R>
) => Effect.Effect<FormData, Error.ResponseError | E, Exclude<R, Scope.Scope>>

Added in v1.0.0

json

Signature

export declare const json: <E, R>(
  effect: Effect.Effect<ClientResponse, E, R>
) => Effect.Effect<unknown, Error.ResponseError | E, Exclude<R, Scope.Scope>>

Added in v1.0.0

stream

Signature

export declare const stream: <E, R>(
  effect: Effect.Effect<ClientResponse, E, R>
) => Stream.Stream<Uint8Array, Error.ResponseError | E, Exclude<R, Scope.Scope>>

Added in v1.0.0

text

Signature

export declare const text: <E, R>(
  effect: Effect.Effect<ClientResponse, E, R>
) => Effect.Effect<string, Error.ResponseError | E, Exclude<R, Scope.Scope>>

Added in v1.0.0

urlParamsBody

Signature

export declare const urlParamsBody: <E, R>(
  effect: Effect.Effect<ClientResponse, E, R>
) => Effect.Effect<UrlParams.UrlParams, Error.ResponseError | E, Exclude<R, Scope.Scope>>

Added in v1.0.0

void

Signature

export declare const void: <E, R>(effect: Effect.Effect<ClientResponse, E, R>) => Effect.Effect<void, E, Exclude<R, Scope.Scope>>

Added in v1.0.0

constructors

fromWeb

Signature

export declare const fromWeb: (request: ClientRequest.ClientRequest, source: Response) => ClientResponse

Added in v1.0.0

models

ClientResponse (interface)

Signature

export interface ClientResponse extends IncomingMessage.IncomingMessage<Error.ResponseError> {
  readonly [TypeId]: TypeId
  readonly status: number
  readonly cookies: Cookies.Cookies
  readonly formData: Effect.Effect<FormData, Error.ResponseError>
}

Added in v1.0.0

schema

schemaBodyJson

Signature

export declare const schemaBodyJson: <A, I, R>(
  schema: Schema.Schema<A, I, R>,
  options?: any
) => <E>(self: IncomingMessage.IncomingMessage<E>) => Effect.Effect<A, any, R>

Added in v1.0.0

schemaBodyJsonScoped

Signature

export declare const schemaBodyJsonScoped: <A, I, R>(
  schema: Schema.Schema<A, I, R>,
  options?: any
) => <E, E2, R2>(
  effect: Effect.Effect<IncomingMessage.IncomingMessage<E>, E2, R2>
) => Effect.Effect<A, any, Exclude<R, Scope.Scope> | Exclude<R2, Scope.Scope>>

Added in v1.0.0

schemaBodyUrlParams

Signature

export declare const schemaBodyUrlParams: <A, I extends Readonly<Record<string, string>>, R>(
  schema: Schema.Schema<A, I, R>,
  options?: any
) => <E>(self: IncomingMessage.IncomingMessage<E>) => Effect.Effect<A, any, R>

Added in v1.0.0

schemaBodyUrlParamsScoped

Signature

export declare const schemaBodyUrlParamsScoped: <A, I extends Readonly<Record<string, string>>, R>(
  schema: Schema.Schema<A, I, R>,
  options?: any
) => <E, E2, R2>(
  effect: Effect.Effect<IncomingMessage.IncomingMessage<E>, E2, R2>
) => Effect.Effect<A, any, Exclude<R, Scope.Scope> | Exclude<R2, Scope.Scope>>

Added in v1.0.0

schemaHeaders

Signature

export declare const schemaHeaders: <A, I extends Readonly<Record<string, string | undefined>>, R>(
  schema: Schema.Schema<A, I, R>,
  options?: any
) => <E>(self: IncomingMessage.IncomingMessage<E>) => Effect.Effect<A, ParseResult.ParseError, R>

Added in v1.0.0

schemaHeadersScoped

Signature

export declare const schemaHeadersScoped: <A, I extends Readonly<Record<string, string>>, R>(
  schema: Schema.Schema<A, I, R>,
  options?: any
) => <E, E2, R2>(
  effect: Effect.Effect<IncomingMessage.IncomingMessage<E>, E2, R2>
) => Effect.Effect<A, any, Exclude<R, Scope.Scope> | Exclude<R2, Scope.Scope>>

Added in v1.0.0

schemaJson

Signature

export declare const schemaJson: <
  R,
  I extends {
    readonly status?: number | undefined
    readonly headers?: Readonly<Record<string, string>> | undefined
    readonly body?: unknown
  },
  A
>(
  schema: Schema.Schema<A, I, R>,
  options?: ParseOptions | undefined
) => (self: ClientResponse) => Effect.Effect<A, any, R>

Added in v1.0.0

schemaJsonScoped

Signature

export declare const schemaJsonScoped: <
  R,
  I extends {
    readonly status?: number | undefined
    readonly headers?: Readonly<Record<string, string>> | undefined
    readonly body?: unknown
  },
  A
>(
  schema: Schema.Schema<A, I, R>,
  options?: ParseOptions | undefined
) => <E, R2>(
  effect: Effect.Effect<ClientResponse, E, R2>
) => Effect.Effect<A, any, Exclude<R, Scope.Scope> | Exclude<R2, Scope.Scope>>

Added in v1.0.0

schemaNoBody

Signature

export declare const schemaNoBody: <
  R,
  I extends { readonly status?: number | undefined; readonly headers?: Readonly<Record<string, string>> | undefined },
  A
>(
  schema: Schema.Schema<A, I, R>,
  options?: ParseOptions | undefined
) => (self: ClientResponse) => Effect.Effect<A, ParseResult.ParseError, R>

Added in v1.0.0

schemaNoBodyScoped

Signature

export declare const schemaNoBodyScoped: <
  R,
  I extends { readonly status?: number | undefined; readonly headers?: Readonly<Record<string, string>> | undefined },
  A
>(
  schema: Schema.Schema<A, I, R>,
  options?: ParseOptions | undefined
) => <E, R2>(
  effect: Effect.Effect<ClientResponse, E, R2>
) => Effect.Effect<A, any, Exclude<R, Scope.Scope> | Exclude<R2, Scope.Scope>>

Added in v1.0.0

type ids

TypeId

Signature

export declare const TypeId: typeof TypeId

Added in v1.0.0

TypeId (type alias)

Signature

export type TypeId = typeof TypeId

Added in v1.0.0