> For the complete documentation index, see [llms.txt](https://docs.susano.re/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.susano.re/api-reference/http-request/httppost.md).

# HttpPost

## Syntax

```lua
Susano.HttpPost(string, string) -> number, string
```

## Parameters

{% hint style="info" %}
`url` (string): Absolute URL.

`data` (string): Request payload (raw bytes or text).
{% endhint %}

## Return(s)

{% hint style="info" %}
`status` (number): HTTP status code.

`body` (string): Response body.

On error: `nil, err` (string).
{% endhint %}

## Behavior

{% hint style="info" %}
Blocking call. Runs on the calling thread.

Sends `data` as-is. No automatic Content-Type.

Follows redirects. Accepts gzip/deflate.

TLS verification enabled.

No custom headers or timeout in this variant.
{% endhint %}

## Example(s)

```lua
local payload = '{"x":1}'
local st, body = Susano.HttpPost("https://httpbin.org/post", payload)
if not st then 
    print("POST failed:", body) 
else 
    print("POST", st, #body) 
end
```
