URL-safe base64-encoded string to decode (max 4096 bytes)
Handles requests to the `/base64/:encoded` endpoint.
Decodes the URL-path base64 string and returns a JSON payload with the
decoded content, a UTF-8 validity flag, and the decoded byte length.
Security
Input is capped at MAX_BASE64_INPUT_BYTES (4096 bytes) to prevent
denial-of-service attacks from oversized decode operations.
Path Parameters
encoded: The base64-encoded string to decode. URL-safe alphabet is
preferred; padding is optional.
Responses
200 OK: JSON object withencoded,decoded,is_utf8,byte_length,
andtiming.duration_ms.400 Bad Request: Invalid base64 input or input exceeds the size limit.
Path Parameters
Response
application/json
Response
Returns decoded content with metadata
Path Parameters
Returns a brotli-encoded JSON echo (`Content-Encoding: br`).
Response
200
Response
brotli-encoded JSON echo of the request
Returns a deflate-encoded JSON echo (`Content-Encoding: deflate`).
Uses the zlib container (matching httpbin’s zlib.compress), which is what
Content-Encoding: deflate means in practice for real-world clients.
Response
200
Response
deflate-encoded JSON echo of the request
Returns a gzip-encoded JSON echo of the request (`Content-Encoding: gzip`).
Response
200
Response
gzip-encoded JSON echo of the request
Returns `n` random bytes as the response body.
Response headers: Content-Type: application/octet-stream, Content-Length: n.
n is capped at MAX_BYTES_RESPONSE_SIZE (10 MiB); larger values return 400.
n = 0 returns an empty 200 OK.
The body is filled via rand::thread_rng().fill_bytes(&mut buf[..]) for
maximum-entropy payloads (useful for verifying binary integrity through a
proxy, since any tampering is observable).
Path Parameters
Number of random bytes to return (max 10485760)
>= 0
Response
application/octet-stream
Response
Returns n random bytes as application/octet-stream