Skip to content

Structure

Response.Body

Represents a Response’s body.
struct Body

Overview

let body = Response.Body(string: "Hello, world!")

This can contain any data (streaming or static) and should match the message’s "Content-Type" header.

Topics

Initializers

Instance Properties

  • buffer
  • count
    The size of the HTTP body’s data. -1 is a chunked stream.
  • data
    Returns static data if not streaming.
  • description
    See CustomDebugStringConvertible.
  • string

Instance Methods

Type Properties

  • empty
    An empty Response.Body.

Relationships

Conforms To

  • Swift.CustomStringConvertible
  • Swift.ExpressibleByExtendedGraphemeClusterLiteral
  • Swift.ExpressibleByStringLiteral
  • Swift.ExpressibleByUnicodeScalarLiteral
  • Swift.Sendable
  • Swift.SendableMetatype