httpx

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package httpx provides shared HTTP response helpers used by both the api and middleware packages to ensure consistent error formatting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteError

func WriteError(w http.ResponseWriter, code int, message string)

WriteError writes a consistent JSON error response with correct headers. All error responses across the codebase should use this function.

func WriteJSON

func WriteJSON(w http.ResponseWriter, code int, v any)

WriteJSON writes a JSON success response with correct headers and status code. All success responses across the codebase should use this function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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