Instance Methodswift-nio 2.72.0NIOTestUtils
receiveHeadAndVerify(deadline:_:)
Waits for a message part to be received and checks that it was a .head
before passing it to the verify
block.
func receiveHeadAndVerify(deadline: NIODeadline = .now() + .seconds(10), _ verify: (HTTPRequestHead) throws -> Void = { _ in }) throws
Parameters
Throws
If the part was not a .head
or nothing was read before the deadline.
Other members in extension
Type members
Instance members
var serverPort: Int
func readInbound(deadline: NIODeadline
) throws -> HTTPServerRequestPart func receiveBody(deadline: NIODeadline
) throws -> ByteBuffer Waits for a message part to be received and checks that it was a
.body
before returning theByteBuffer
it contained.func receiveBodyAndVerify(deadline: NIODeadline, (ByteBuffer) throws -> Void
) throws Waits for a message part to be received and checks that it was a
.body
before passing it to theverify
block.func receiveEnd(deadline: NIODeadline
) throws -> HTTPHeaders? Waits for a message part to be received and checks that it was a
.end
before returning theHTTPHeaders?
it contained.func receiveEndAndVerify(deadline: NIODeadline, (HTTPHeaders?) throws -> Void
) throws Waits for a message part to be received and checks that it was a
.end
before passing it to theverify
block.func receiveHead(deadline: NIODeadline
) throws -> HTTPRequestHead Waits for a message part to be received and checks that it was a
.head
before returning theHTTPRequestHead
it contained.func stop(
) throws func writeOutbound(HTTPServerResponsePart
) throws