http

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpServerAPI

type HttpServerAPI interface {
	// AddResponseHeader adds a new header entry to the response associated
	// with the given context. If the same key is added multiple times, the
	// values are appended.
	AddResponseHeader(ctx context.Context, key, value string)

	// SetResponseCode sets a custom HTTP status code for the response
	// associated with the given context. This overrides the default 200 OK
	// status.
	SetResponseCode(ctx context.Context, code int)
}

HttpServerAPI provides methods to interact with the current HTTP response within a request handler.

This interface is implemented by the mikros framework and made available to services that opt into the feature. It allows handler logic to customize the HTTP response dynamically, such as setting headers and status codes.

Jump to

Keyboard shortcuts

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