{urlsend}
Sample Usage
{note}Sends a message to acme.com/log_delivery with the widget count when this snippet is inserted{endnote}
{urlsend: https://example.com/log_delivery?widgets={=count}}
Settings
Setting Name Type Description General URL Settings _ url The URL to request. Fox example, https://example.com/page
method GET/POST/... The HTTP method used to make the request. Defaults to GET
. body text The body of the request. headers Key/Value List A list of headers. For example, Content-Type=text/json,Authorization=Basic 12345
General Command Settings trim yes/no/left/right If yes
whitespace is removed before and after the command. If left
, only whitespace to the left is removed. If right
, only whitespace to the right is removed.
Setting Name | Type | Description |
---|---|---|
General URL Settings | ||
_ | url | The URL to request. Fox example, https://example.com/page |
method | GET/POST/... | The HTTP method used to make the request. Defaults to GET . |
body | text | The body of the request. |
headers | Key/Value List | A list of headers. For example, Content-Type=text/json,Authorization=Basic 12345 |
General Command Settings | ||
trim | yes/no/left/right | If yes whitespace is removed before and after the command. If left , only whitespace to the left is removed. If right , only whitespace to the right is removed. |
The urlsend
command allows you to send a message to a server when a snippet is inserted. This can be used for logging snippet usage, or even saving the variables that were used in a snippet.
The command's first positional setting is the URL you want to send data to.
You also have access to settings like method
, body
, and headers
so you can specify the data you want to send.
You can develop your own server application to collect and store data from the urlsend
command.
As a simpler and free approach, we have found that Google Forms works well to collect data. See this example.
See also the {urlload} command for loading data from a server into your snippet.
Sharing connected snippets with others
When sharing snippets with others, snippets containing the urlsend
command may only be shared with members of your Text Blaze Business organization.