send to gotify a message using fetch

I have tried to find examples of how to send json content using the fetch tool with other headers but it was hard to find.
Eventually what I found to work is:

{
	:local gotifyToken "testToken";
	:local gotifyEndpointUrl "https://gotify.example.org/message";

	:local serviceName "web service";
	:local source "Device 1234";
	
	:local state "UP";
	
	:local httpData "{ \"title\": \"Netwatch Message\", \"message\": \"$source : $serviceName is $state\" }";
	/tool fetch url=$gotifyEndpointUrl http-data="$httpData" \
		http-header-field="X-Gotify-Key:$gotifyToken,content-type:application/json" \
		http-method=post mode=https output=none;
}