pub(crate) async fn upload_stream(
client: &Client,
endpoint: &str,
fields: UploadFields<'_>,
) -> Result<(), UploadError>Expand description
Uploads one completed voice stream to an SDRTrunk-compatible Rdio
Scanner endpoint.
Builds the multipart form from fields, POSTs it to endpoint with
User-Agent: sdrtrunk, and verifies the response body contains the
"Call imported successfully." marker. Any deviation (network error,
non-2xx status, missing marker) becomes an UploadError.
§Errors
UploadError::Http— transport/DNS/TLS/read failure.UploadError::Build— multipart part construction failed (invalid filename).UploadError::ServerError— non-2xx HTTP status.UploadError::UnexpectedResponse— 2xx status but success marker absent from the body.