fetch

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(url string, options Options) (*http.Response, error)

Fetch is a helper function that mimics the fetch API in JavaScript.

func Text

func Text(url string, options Options) (string, error)

FetchText is a convenience function to get the response body as a string.

Types

type Options

type Options struct {
	Method  string
	Headers map[string]string
	Body    []byte
}

Jump to

Keyboard shortcuts

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