Python examples; that's all; closes #50

This commit is contained in:
Philipp Heckel 2021-12-15 20:37:21 -05:00
parent 92f48fbbea
commit 4346f55b29
3 changed files with 30 additions and 0 deletions

View file

@ -52,6 +52,12 @@ is in the request body. Here's an example showing how to publish a simple messag
strings.NewReader("Backup successful 😀"))
```
=== "Python"
``` python
requests.post("https://ntfy.sh/mytopic",
data="Backup successful 😀".encode(encoding='utf-8'))
```
=== "PHP"
``` php-inline
file_get_contents('https://ntfy.sh/mytopic', false, stream_context_create([