receiveEnd(deadline:)

Waits for a message part to be received and checks that it was a .end before returning the HTTPHeaders? it contained.

NIOHTTP1TestServer.swift:459
func receiveEnd(deadline: NIODeadline = .now() + .seconds(10)) throws -> HTTPHeaders?

Parameters

deadline

The deadline by which a part must have been received.

Returns

The HTTPHeaders? from the .end.

Throws

If the part was not a .end or nothing was read before the deadline.