pub async fn download_data(
cert: Option<Certificate>,
name: String,
body: DownloadAssetRequest,
context: Arc<Context>,
) -> Result<impl Reply, Rejection>
Expand description
Handles a GET that downloads an entire dataset. This basically emulates a data transfer.
§Arguments
cert
: The client certificate by which we may extract some identity. Only clients that are authenticated by the local store may connect.name
: The name of the dataset to download.body
: The body given with the request.context
: The context that carries options and some shared structures between the warp paths.
§Returns
The response that can be sent back to the client. Contains a raw binary of the dataset, which is packaged as an archive before sending.
§Errors
This function may error (i.e., reject) if we didn’t know the given name or we failed to serialize the relevant AssetInfo.