pub fn probe(
mock: &Arc<Mock>,
method: &str,
target: &str,
body: Value,
) -> (u16, Value)Expand description
One request against a mock, IN PROCESS, with no socket at all.
The router is the only place several behaviours live — the transport reset,
the dropped reply, the firewall’s 403 — and [crate::self_check] has to
reach them without binding a port, spawning a runtime or shelling out to
anything. So the request struct is built here and handed straight to
[route].
Status 0 means [Outcome::Reset]: the socket was closed with nothing
written, which is not a status and must never be confused with one. A caller
that treats 0 as success is making the exact mistake behaviour 2 was written
for.
authorized is always true: the unauthenticated 401 is a property of the
header parser above [route], not of the estate, and a calibration that
drove it would be measuring the parser.