Type Aliasasync-http-client 1.25.2AsyncHTTPClient
Element
HTTPClientResponse.swift:80- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
typealias Element = ByteBuffer
typealias Element = ByteBuffer
import AsyncHTTPClient
This package provides simple HTTP Client library built on top of SwiftNIO.
struct Body
A representation of the response body for an HTTP response.
struct HTTPClientResponse
A representation of an HTTP response for the Swift Concurrency HTTPClient API.
struct ByteBuffer
ByteBuffer
stores contiguously allocated raw bytes. It is a random and sequential accessible sequence of zero or more bytes (octets).
init()
static func bytes(_ byteBuffer: ByteBuffer) -> HTTPClientResponse.Body
static func stream<SequenceOfBytes>(_ sequenceOfBytes: SequenceOfBytes) -> HTTPClientResponse.Body where SequenceOfBytes : Sendable, SequenceOfBytes : AsyncSequence, SequenceOfBytes.Element == ByteBuffer
func collect(upTo maxBytes: Int) async throws -> ByteBuffer
Accumulates Body
of ByteBuffer
s into a single ByteBuffer
.
func makeAsyncIterator() -> AsyncIterator
struct AsyncIterator