1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-11-23 03:43:47 +01:00

Update publish.md with powershell snippet for uploading files

This commit is contained in:
YMan84 2024-01-15 19:11:55 -05:00 committed by GitHub
parent bb4b5d2bc8
commit 7dfcda9306
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2440,6 +2440,17 @@ Here's an example showing how to upload an image:
http.DefaultClient.Do(req) http.DefaultClient.Do(req)
``` ```
=== "PowerShell"
``` powershell
$Request = @{
Method = "POST"
Uri = "ntfy.sh/flowers"
InFile = "flower.jpg"
Headers = @{"Filename" = "flower.jpg"}
}
Invoke-RestMethod @Request
```
=== "Python" === "Python"
``` python ``` python
requests.put("https://ntfy.sh/flowers", requests.put("https://ntfy.sh/flowers",