objectstore_server/
batch.rs

1//! HTTP header names used in batch request and response processing.
2//!
3//! These headers carry per-operation metadata in the multipart bodies of batch
4//! requests and responses. Clients include [`HEADER_BATCH_OPERATION_KEY`] and
5//! [`HEADER_BATCH_OPERATION_KIND`] on each request part; the server echoes all
6//! three — including [`HEADER_BATCH_OPERATION_INDEX`] — on each response part
7//! so clients can correlate results with their original operations.
8
9/// Zero-based position of this operation within the batch, set by the server on response parts.
10///
11/// Clients use this to match each response part back to its corresponding request operation.
12pub const HEADER_BATCH_OPERATION_INDEX: &str = "x-sn-batch-operation-index";
13
14/// Base64-encoded object key for this batch operation, required on request parts.
15///
16/// The key is base64-encoded to allow arbitrary byte sequences in object keys without conflicting
17/// with HTTP header encoding restrictions.
18pub const HEADER_BATCH_OPERATION_KEY: &str = "x-sn-batch-operation-key";
19
20/// Operation kind for this batch part: `"get"`, `"insert"`, or `"delete"`.
21pub const HEADER_BATCH_OPERATION_KIND: &str = "x-sn-batch-operation-kind";