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

# HTTP

Sidef can load and use Perl modules:

```ruby
require('HTTP::Tiny')

func get(url) {
    static ua = %O<HTTP::Tiny>.new(agent => 'Mozilla/5.0')
    var resp = ua.get(url)
    if (resp{:success}) {
        return resp{:content}.decode_utf8
    }
    return nil
}

say get("http://example.net")
```
