Documentation ¶
Index ¶
Constants ¶
View Source
const (
// TypeKey for HTTP headers.
TypeKey = "Content-Type"
)
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶ added in v1.286.0
func NewHandler[Res any](cont *Content, prefix string, handler Handler[Res]) http.HandlerFunc
NewHandler for content.
func NewRequestHandler ¶ added in v1.347.0
func NewRequestHandler[Req any, Res any](cont *Content, prefix string, handler RequestHandler[Req, Res]) http.HandlerFunc
NewRequestHandler for content.
Types ¶
type Content ¶ added in v1.287.0
type Content struct {
// contains filtered or unexported fields
}
Content creates types from media types.
func NewContent ¶ added in v1.287.0
NewContent with an encoding.
func (*Content) NewFromMedia ¶ added in v1.287.0
NewFromMedia for content.
Click to show internal directories.
Click to hide internal directories.