httpfetch

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package httpfetch provides an SSRF-safe HTTP client for fetching external URLs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(ctx context.Context, rawURL string, maxBytes int64) (body []byte, contentType string, err error)

Fetch downloads the resource at rawURL and returns its body and content-type. It enforces HTTPS-only, rejects private/loopback/link-local IPs to prevent SSRF, and limits the response body to maxBytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL