wispie

Values

pub fn response_to_string(
  response: response.Response(wisp.Body),
) -> String

Converts an HTTP response.Response(wisp.Body) into a human-readable string.

This function renders the full HTTP response snapshot, including:

  • Status code
  • Headers
  • Body, formatted according to its Content-Type

Body rendering rules:

  • wisp.Text bodies are pretty-printed based on their content type (e.g. JSON, HTML).
  • wisp.Bytes bodies are decoded as UTF-8 when possible; otherwise a placeholder is shown.
  • wisp.File bodies are displayed as a formatted file reference with offset and limit.
Search Document