Liking cljdoc? Tell your friends :D

wagoe.platform.shell.interfaces.http.common

Common HTTP utilities and RFC 7807 Problem Details support.

This namespace provides common HTTP functionality including standardized error responses following RFC 7807 Problem Details specification and other utility functions used across HTTP interfaces.

Pure problem details transformations are now in wagoe.platform.core.http.problem-details

Common HTTP utilities and RFC 7807 Problem Details support.

This namespace provides common HTTP functionality including standardized
error responses following RFC 7807 Problem Details specification and
other utility functions used across HTTP interfaces.

Pure problem details transformations are now in wagoe.platform.core.http.problem-details
raw docstring

create-method-not-allowed-handlerclj

(create-method-not-allowed-handler allowed-methods)

Create a standardized 405 Method Not Allowed handler.

Args: allowed-methods: Collection of allowed HTTP methods

Returns: Ring handler function for 405 responses

Create a standardized 405 Method Not Allowed handler.

Args:
  allowed-methods: Collection of allowed HTTP methods

Returns:
  Ring handler function for 405 responses
sourceraw docstring

create-not-found-handlerclj

(create-not-found-handler)

Create a standardized 404 Not Found handler.

Returns: Ring handler function for 404 responses

Create a standardized 404 Not Found handler.

Returns:
  Ring handler function for 404 responses
sourceraw docstring

default-error-mappingsclj

Default mapping of exception types to HTTP status codes and titles.

Re-exported from core for backward compatibility.

Default mapping of exception types to HTTP status codes and titles.

Re-exported from core for backward compatibility.
sourceraw docstring

exception->problemclj

(exception->problem ex correlation-id uri)
(exception->problem ex correlation-id uri error-mappings)

Convert exception to RFC 7807 problem details.

Delegates to pure core function.

Creates standardized error responses following RFC 7807 Problem Details for HTTP APIs specification.

Args: ex: Exception to convert correlation-id: Request correlation ID uri: Request URI error-mappings: Optional custom error type mappings (overrides defaults)

Returns: Ring response map with RFC 7807 problem details

Convert exception to RFC 7807 problem details.

Delegates to pure core function.

Creates standardized error responses following RFC 7807 Problem Details
for HTTP APIs specification.

Args:
  ex: Exception to convert
  correlation-id: Request correlation ID
  uri: Request URI
  error-mappings: Optional custom error type mappings (overrides defaults)

Returns:
  Ring response map with RFC 7807 problem details
sourceraw docstring

health-check-handlerclj

(health-check-handler service-name)
(health-check-handler service-name version)
(health-check-handler service-name version additional-checks)

Create a generic health check handler.

Args: service-name: Name of the service version: Service version (optional) additional-checks: Optional function that returns additional health data

Returns: Ring handler function for health checks

Create a generic health check handler.

Args:
  service-name: Name of the service
  version: Service version (optional)
  additional-checks: Optional function that returns additional health data

Returns:
  Ring handler function for health checks
sourceraw docstring

readiness-handlerclj

(readiness-handler db-context cache)

Create a readiness check handler that verifies dependency health.

Checks database and (optionally) cache connectivity. Returns 200 when all components are healthy, 503 when any component is down.

Args: db-context: Database context (required) cache: Cache component (optional, nil if not configured)

Returns: Ring handler function for readiness checks

Create a readiness check handler that verifies dependency health.

Checks database and (optionally) cache connectivity. Returns 200
when all components are healthy, 503 when any component is down.

Args:
  db-context: Database context (required)
  cache: Cache component (optional, nil if not configured)

Returns:
  Ring handler function for readiness checks
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close