API / Minn\Http / Transport

Transport final class

Minn\Http\Transport · public/minn/src/Minn/Http/Transport.php · 138 lines

The engine's outgoing HTTP transport over curl: it sends exactly what an Outbound says and nothing else decides. Redirects are followed by curl, so the header lines of every hop arrive in order; only the last response's block is kept, the way plugin code expects to read it. Code calling out goes through Minn\Http, which owns the rules about where a request may go.

Used by 1

Public

staticsend(Minn\Http\Outbound $request): Minn\Http\Exchange#

Performs one outgoing request over curl and returns the exchange, a transport error included.

Internals 4

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privateoptions(Minn\Http\Outbound $request, array $lines): array#

The curl options every request carries, the header lines collected into $lines as they arrive.

$lineslist<string>
@return array<int, mixed>
privatelimit(int $maxBytes): array#

Stops a body that grows past $maxBytes: curl refuses up front when the length is announced, and the progress callback aborts when it is not.

@return array<int, mixed>
privatelastHead(array $lines): array#

The last response's status line and header lines, line endings removed.

$lineslist<string>
@return list<string>
privatelastBlock(array $lines): array#
$lineslist<string>
@return array{0: array<string, string|list<string>>, 1: list<string>}