netutil

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package netutil provides network-related helper functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPGet

func HTTPGet(url string) ([]byte, error)

HTTPGet gets a response from the given URL and returns it as a byte slice.

func HTTPGetJSON

func HTTPGetJSON(url string, jsonData interface{}) error

HTTPGetJSON gets a response from the given URL and stores it in jsonData. It is the caller's responsibility to make sure the response is in JSON format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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