upload

command
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

upload demonstrates POST body collection with a max-body limit. Oversize uploads get 413 automatically.

CGO_ENABLED=1 go run -tags gogo ./examples/upload

# Small upload echoes back the SHA-256 of the body.
curl -XPOST --data-binary @go.mod http://localhost:3003/upload

# Larger than 64 KiB → 413
dd if=/dev/zero bs=1024 count=100 | curl -XPOST --data-binary @- http://localhost:3003/upload

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL