httputil

package
v1.13.12 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reply

func Reply(w http.ResponseWriter, code int, data interface{})

Reply replies a http request with a json response.

func ReplyWith

func ReplyWith(w http.ResponseWriter, code int, bodyType string, msg []byte)

ReplyWith replies a http request with a bodyType response.

func ReplyWithStream

func ReplyWithStream(w http.ResponseWriter, code int, bodyType string, body io.Reader, bytes int64)

ReplyWithStream replies a http request with a streaming response.

Types

This section is empty.

Jump to

Keyboard shortcuts

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