httpjson

package
v0.1.99 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPGet

func HTTPGet[T any](client *http.Client, url string) (obj T, statusCode int, err error)

Get makes an HTTP GET request to the specified URL and unmarshals the JSON response into the provided generic type T.

func HTTPGetWithError

func HTTPGetWithError[T any, TError any](client *http.Client, url string) (obj T, objError TError, statusCode int, err error)

Get makes an HTTP GET request to the specified URL and unmarshals the JSON response into the provided generic type T.

func NewHTTPClient

func NewHTTPClient(insecure bool) *http.Client

Helper function to get the appropriate HTTP client

Types

This section is empty.

Jump to

Keyboard shortcuts

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