httpok

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 1

README

Candango HttpOK

Welcome to the world of httpok, your Go library for extending the capabilities of the standard net/http package!

Installation

To get httpok, you can use go get:

go get github.com/candango/httpok

Support

HttpOK is one of Candango Open Source Group initiatives. Available under the Apache License, Version 2.0.

This site and all documentation are licensed under Creative Commons 3.0.

Copyright © 2024 Flavio Garcia

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chain

func Chain(next http.Handler, ms ...Middleware) http.Handler

Chain creates a chain of HTTP middleware functions to wrap around a http.Handler. It applies each middleware in the order they are provided, allowing for layered processing of HTTP requests and responses.

Types

type Middleware

type Middleware func(http.Handler) http.Handler

Middleware represents a function that can wrap a http.Handler with additional functionality. It takes a http.Handler and returns a new http.Handler that includes the middleware's behavior.

type WrappedWriter added in v0.0.2

type WrappedWriter struct {
	http.ResponseWriter
	StatusCode int
}

func (*WrappedWriter) WriteHeader added in v0.0.2

func (w *WrappedWriter) WriteHeader(c int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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