diff --git a/docs/pushmsg.html b/docs/pushmsg.html index d1fd6c9..e1ccafc 100644 --- a/docs/pushmsg.html +++ b/docs/pushmsg.html @@ -63,10 +63,14 @@

To authenticate as an application you need the application token. The token is returned in the REST request and is viewable in the WebUI.

-

Now you can simply use curl, HTTPie or any other http-client to push messages.

+

Now you can simply use curl, HTTPie or any other installed http-client to push messages.

$ curl "https://push.example.de/message?token=<apptoken>" -F "title=my title" -F "message=my message" -F "priority=5"
 $ http -f POST "https://push.example.de/message?token=<apptoken>" title="my title" message="my message" priority="5"
 
+

On Microsoft PowerShell, you could alternatively use the built-in Invoke-RestMethod or Invoke-WebRequest cmdlets.

+
PS> Invoke-RestMethod -Uri "https://push.example.de/message?token=<apptoken>" -Method POST -Body @{title="my title"; message="my message"; priority=5} # return is automatically parsed into a PowerShell object
+PS> Invoke-WebRequest -Uri "https://push.example.de/message?token=<apptoken>" -Method POST -Body @{title="my title"; message="my message"; priority=5} # return is as raw response
+

The message API takes an extras property that carries extra information with the message and describes how clients behave to this message. See message extras for more information.

diff --git a/docs/pushmsg/index.html b/docs/pushmsg/index.html index d1fd6c9..e1ccafc 100644 --- a/docs/pushmsg/index.html +++ b/docs/pushmsg/index.html @@ -63,10 +63,14 @@

To authenticate as an application you need the application token. The token is returned in the REST request and is viewable in the WebUI.

-

Now you can simply use curl, HTTPie or any other http-client to push messages.

+

Now you can simply use curl, HTTPie or any other installed http-client to push messages.

$ curl "https://push.example.de/message?token=<apptoken>" -F "title=my title" -F "message=my message" -F "priority=5"
 $ http -f POST "https://push.example.de/message?token=<apptoken>" title="my title" message="my message" priority="5"
 
+

On Microsoft PowerShell, you could alternatively use the built-in Invoke-RestMethod or Invoke-WebRequest cmdlets.

+
PS> Invoke-RestMethod -Uri "https://push.example.de/message?token=<apptoken>" -Method POST -Body @{title="my title"; message="my message"; priority=5} # return is automatically parsed into a PowerShell object
+PS> Invoke-WebRequest -Uri "https://push.example.de/message?token=<apptoken>" -Method POST -Body @{title="my title"; message="my message"; priority=5} # return is as raw response
+

The message API takes an extras property that carries extra information with the message and describes how clients behave to this message. See message extras for more information.