43 lines
1.5 KiB
Markdown
43 lines
1.5 KiB
Markdown
A simple HTTP service to store & retrieve ephemeral data.
|
|
|
|
The application can be used to `POST`, `PUT`, and `GET` a limited amount of data.
|
|
Old data will automatically be removed.
|
|
You may choose to have data immediately removed once it's been retrieved.
|
|
|
|
This can be used as a simple clipboard on the web.
|
|
|
|
# Examples
|
|
|
|
Create a password on your computer and share it with your mobile device.
|
|
|
|
```sh
|
|
pwgen -s 128 1 \
|
|
| tee my-new-password \
|
|
| https post webclip.example.org/?once=1 \
|
|
| jq -r .url \
|
|
| qrencode -tUTF8
|
|
```
|
|
|
|
|
|
Share a clipboard between multiple devices.
|
|
|
|
```sh
|
|
# Choose a unique name for your clipboard.
|
|
WEBCLIP=my-private-clipboard
|
|
|
|
# Copy something on your computer, make it available to your web clipboard.
|
|
xclip -o -sel clip | https put "webclip.example.org/$WEBCLIP"
|
|
|
|
# Load something from your web clipboard.
|
|
https "webclip.example.org/$WEBCLIP" | xclip -sel clip
|
|
```
|
|
|
|
# Feature ideas
|
|
|
|
Some of these ideas might be bad, as they could impact performance or security negatively, or just aren't useful.
|
|
|
|
- Support setting the response content-type to allow sharing of rich media files
|
|
- Support query param `new=1` for `POST` & `PUT` to ensure no existing data is replaced
|
|
- Encrypt data in memory/storage
|
|
- Support long-polling for updates, effectively claiming a clipboard for `once` ops before it's created, `http "${url}?wait=1" &; <secret http put "${url}?once=1`
|
|
- Support 302 redirects, `echo 'https://example.org/my/space' | https put "$url"; http --follow "$url"`
|