wget.md

 1# wget
 2
 3`wget` can POST with `--post-data`. Headers are added with `--header`.
 4
 5## Examples
 6
 7```bash
 8# normal success
 9wget --quiet --output-document=- \
10  --header="Authorization: Bearer $NTFY_ACCESS_TOKEN" \
11  --header="Title: Refactored authentication middleware in rumilo" \
12  --header="Tags: hammer_and_wrench" \
13  --post-data="Finished refactoring the auth middleware in rumilo. Session validation is cleaner now and all tests pass." \
14  "https://ntfy.sh/$NTFY_TOPIC_LLM"
15
16# success with a relevant click URL
17wget --quiet --output-document=- \
18  --header="Authorization: Bearer $NTFY_ACCESS_TOKEN" \
19  --header="Title: Updated AUR package for kagi-ken" \
20  --header="Tags: package" \
21  --header="Click: https://aur.archlinux.org/packages/kagi-ken" \
22  --post-data="Bumped the kagi-ken AUR package to v0.4.2 and updated the checksums." \
23  "https://ntfy.sh/$NTFY_TOPIC_LLM"
24
25# something went wrong
26wget --quiet --output-document=- \
27  --header="Authorization: Bearer $NTFY_ACCESS_TOKEN" \
28  --header="Title: Build failed in pi-mono — disk full" \
29  --header="Tags: rotating_light" \
30  --header="Priority: 4" \
31  --post-data="Ran into a full disk on the build server while compiling pi-mono. /var/log looks like it needs rotation. The build is blocked until there's space." \
32  "https://ntfy.sh/$NTFY_TOPIC_LLM"
33
34# urgent failure
35wget --quiet --output-document=- \
36  --header="Authorization: Bearer $NTFY_ACCESS_TOKEN" \
37  --header="Title: Production database unreachable" \
38  --header="Tags: sos" \
39  --header="Priority: 5" \
40  --post-data="The primary Postgres instance stopped responding during a migration. Rolled back what we could, but the app is down." \
41  "https://ntfy.sh/$NTFY_TOPIC_LLM"
42```