HBRequestBody

public enum HBRequestBody

Request Body. Either a ByteBuffer or a ByteBuffer streamer

  • Static ByteBuffer

    Declaration

    Swift

    case byteBuffer(ByteBuffer?)
  • ByteBuffer streamer

    Declaration

    Swift

    case stream(HBRequestBodyStreamer)
  • Return as ByteBuffer

    Declaration

    Swift

    public var buffer: ByteBuffer? { get }
  • Return as streamer if it is a streamer

    Declaration

    Swift

    public var stream: HBStreamerProtocol? { get }
  • Provide body as a single ByteBuffer

    Declaration

    Swift

    public func consumeBody(on eventLoop: EventLoop) -> EventLoopFuture<ByteBuffer?>

    Parameters

    eventLoop

    EventLoop to use

    Return Value

    EventLoopFuture that will be fulfilled with ByteBuffer. If no body is include then return nil