http

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const XHttpCode = "x-http-code"

XHttpCode is used for overriding the standard HTTP code

Variables

This section is empty.

Functions

func CustomHTTPErrorHandler

func CustomHTTPErrorHandler(ctx context.Context, w http.ResponseWriter, r *http.Request, err errors.EncodedError)

CustomHTTPErrorHandler provides handling of custom error object It is very similar to runtime.DefaultHTTPErrorHandler except it takes in the EncodedError object

func HTTPResponseModifier

func HTTPResponseModifier(ctx context.Context, w http.ResponseWriter, p proto.Message) error

HTTPResponseModifier is a helper function to override the HTTP status code

Types

This section is empty.

Jump to

Keyboard shortcuts

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