httputil

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckStatus added in v0.2.11

func CheckStatus(resp *http.Response, prefix string) error

CheckStatus returns an error if the response status code is not 2xx. The prefix is included in the error message for context (e.g. "discord: webhook").

func ReadSnippet

func ReadSnippet(r io.Reader) string

ReadSnippet reads up to 200 bytes from r for inclusion in error messages.

Types

This section is empty.

Jump to

Keyboard shortcuts

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