Http Formatter
open class HttpFormatter(theme: ColorTheme = ColorTheme.LIGHT_ON_DARK, useColor: Boolean = isColorSupported())(source)
A utility class to format HTTP requests and responses into colorized strings for better readability.
This formatter applies syntax highlighting based on HTTP methods, headers, bodies, and status codes. It supports customizable color themes and enables or disables colorization depending on platform support.
Parameters
theme
The color theme to be applied for formatting.
use Color
Boolean flag indicating whether ANSI color codes should be used in the formatting output.
Types
Link copied to clipboard
data class ColorScheme(val path: AnsiColor, val headerName: AnsiColor, val headerValue: AnsiColor, val body: AnsiColor)