httputil

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 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.

Jump to

Keyboard shortcuts

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