added HTTP Shortcuts to readme

This commit is contained in:
cpu
2025-03-31 15:47:44 +02:00
parent 948ee3b041
commit 07a9e2b4b8

View File

@@ -126,6 +126,30 @@ In your Flic app or Flic Hub SDK interface:
<img src="images/flic-button-request.png" width="300" alt="Flic Button Request"> <img src="images/flic-button-request.png" width="300" alt="Flic Button Request">
## App Example: "HTTP Shortcuts" by waboodoo
Search the Play Store - there might be others with similar names.
1. Install the App: Download and install "HTTP Shortcuts" or a similar app from the Google Play Store.
2. Create a New Shortcut within the App:
* Open the app and usually tap a '+' or 'Add' button.
* Give your shortcut a Name (e.g., "Turn on Office Light", "Log Water Intake").
* Choose an Icon.
* Enter the URL you want the request sent to (your webhook URL, IFTTT URL, Home Assistant webhook trigger, etc.).
* Select the HTTP Method (GET, POST, PUT, DELETE, etc. - often GET or POST for simple triggers).
* For POST/PUT: You'll likely need to configure the Request Body (e.g., JSON data) and Content Type (e.g., application/json).
* Authentication: Configure Basic Auth, Bearer Tokens, or custom Headers if your endpoint requires authentication.
* Other Options: Explore settings for response handling (show message on success/failure), timeouts, etc.
* Save the shortcut configuration within the app.
3. Add the Widget/Shortcut to your Home Screen:
* Go to your Android Home Screen.
* Long-press on an empty space.
* Select "Widgets".
* Scroll through the list to find the "HTTP Shortcuts" app (or the app you installed).
* Drag the app's widget or shortcut option onto your home screen.
* The app will likely ask you to choose which specific shortcut (the one you just created) this widget should trigger. Select it.
4. Test: Tap the newly created button on your home screen. It should trigger the internet request you configured.
## API Endpoints ## API Endpoints
* **`POST /subscribe`** * **`POST /subscribe`**