> For the complete documentation index, see [llms.txt](https://refresh-cx.gitbook.io/refresh.cx-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://refresh-cx.gitbook.io/refresh.cx-docs/http-requests/poll.md).

# Poll

Checks a job. Returns `false` while pending, or `true`, the status code, and the body once done.

## **Syntax**

```lua
refresh.Http.Poll(jobId) -> Boolean [, Integer, String]
```

## **Return**

{% hint style="success" %}
Boolean (done), Integer (status), String (body)
{% endhint %}

## Usage Example

```lua
CreateThread(function()
    local id = refresh.Http.Get("https://api.example.com/announce")
    while true do
        local done, status, body = refresh.Http.Poll(id)
        if done then
            print(status, body)
            break
        end
        Wait(100)
    end
end)
```
