httpx

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrTypeInvalidRequest = "invalid_request_error"
	ErrTypeAPI            = "api_error"
	ErrTypeAuthentication = "authentication_error"
	ErrTypeStream         = "stream_error"
)

Anthropic-compatible error type constants.

Variables

This section is empty.

Functions

func WriteError

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

WriteError writes an Anthropic-compatible JSON error response.

func WriteJSON

func WriteJSON(w http.ResponseWriter, status int, body any)

WriteJSON writes a JSON response with the given 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