From a3915fed764b6aa589ddf6e0740f7683ac0763b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Szab=C3=B3?= <25702868+szabodanika@users.noreply.github.com> Date: Mon, 11 Apr 2022 19:31:56 +0100 Subject: [PATCH] Updated README.MD with cURL instructions --- README.MD | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.MD b/README.MD index b318962..75eef9b 100644 --- a/README.MD +++ b/README.MD @@ -23,6 +23,24 @@ WantedBy=multi-user.target Then start the service with `systemctl start microbin` and enable it on boot with `systemctl enable microbin`. +### Create Pasta with cURL + +Simple text Pasta: `curl -d "expiration=10min&content=This is a test pasta" -X POST https://microbin.myserver.com/create` + +Simple text Pasta: `curl -d "expiration=10min&content=$( < mypastafile.txt )" -X POST https://microbin.myserver.com/create` + +Available expiration options: +- 1min +- 10min +- 1hour +- 24hour +- 1week +- never + +Use cURL to read the pasta: `curl https://microbin.myserver.com/rawpasta/fish-pony-crow` + +or to download the pasta: `curl https://microbin.myserver.com/rawpasta/fish-pony-crow > output.txt` + ### Features - No CSS or JS, super lightweight and simple - Animal names instead of random numbers for pasta identifiers