# 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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.susano.re/api-reference/http-request/httppost.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
