httputil

package
Version: v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadHTTPResponseBodyNoErr

func ReadHTTPResponseBodyNoErr(resp *http.Response) []byte

ReadHTTPResponseBodyNoErr reads entire HTTP response body into a byte slice, silently skipping errors.

func WriteJSON

func WriteJSON(w http.ResponseWriter, v interface{}) (int, error)

WriteJSON writes a JSON structure to a response and sets Content-Type header.

func WriteStatus

func WriteStatus(w http.ResponseWriter, code int) (int, error)

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL