> For the complete documentation index, see [llms.txt](https://edwn.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edwn.gitbook.io/documentation/useful-information/examples/webhook.md).

# Webhook

Demonstration on how to http post, using client functions.

{% code title="Webhook.lua" lineNumbers="true" %}

```lua
local WebhookUrl = "YOUR URL HERE"

local PostData = string.format(
    [[{
        "embeds": [
            {
                "title": "Untitled Project Lua Webhook",
                "fields": [
                    {
                        "name": "Username",
                        "value": "%s",
                        "inline": true
                    },
                    {
                        "name": "IP Address",
                        "value": "%s",
                        "inline": true
                    },
                    {
                        "name": "HWID",
                        "value": "%s",
                        "inline": true
                    },
                    {
                        "name": "Current Time",
                        "value": "%s",
                        "inline": true
                    },
                    {
                        "name": "Lua Version",
                        "value": "%s",
                        "inline": true
                    }
                ]
            }
        ]
    }
]], Client.GetUsername(), Client.GetIPAddress(), Client.GetHwid(), os.date("%Y-%m-%d %H:%M:%S"), _VERSION)

Http.Post(WebhookUrl, PostData)
```

{% endcode %}
