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

# HTTP

Provides HTTP and server implementations.

### Methods <a href="#methods" id="methods"></a>

#### `http.handle()` <a href="#httphandle" id="httphandle"></a>

Registers a new handler for the given pattern.

```dart
http.handle("/", function(request) {
    printftw("hello world")
})
```

#### `http.listen()` <a href="#httplisten" id="httplisten"></a>

Starts an HTTP server with the given address. Executes the provided callback if successful.

```dart
http.listen(3000, function() {
    printftw("Server started at http://localhost:3000 🌱")
})
```
