---
title: "Echoes back details of the incoming request for any HTTP method."
url: "https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8/operations/anything_handler"
---

> Full API specification: https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8.md

# Echoes back details of the incoming request for any HTTP method.

`HEAD` `/anything`

Operation ID: `anything_handler`

This endpoint is useful for debugging and understanding how requests are processed. It reflects the method, path, query parameters, headers, and body of the request. # Responses: - `200 OK`: Successfully echoed the request details as a JSON object. Note: While this handler is registered for `/anything` and `/anything/*path`, the OpenAPI documentation for `/anything/*path` is handled by `anything_path_handler` due to current limitations in `utoipa` with wildcard path parameters in a single handler.

## Query parameters

- `connection` (string, optional) - Set to `close` to force a `Connection: close` response and hang up the connection afterward (HTTP/1.1 only; ignored over HTTP/2)

## Request body (required)

Content types: `application/octet-stream`

## Responses

- `200` - Echoes request details (includes a `tls` object over HTTPS; a `connection` field when `?connection=close` is set)

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: rucho
  version: 1.6.0
servers:
  - url: https://rucho.org
    description: Production (EKS us-east-2, behind Kong)
paths:
  /anything:
    head:
      tags:
        - crate::routes::core_routes
      summary: Echoes back details of the incoming request for any HTTP method.
      description: >-
        This endpoint is useful for debugging and understanding how requests are
        processed.

        It reflects the method, path, query parameters, headers, and body of the
        request.


        # Responses:

        - `200 OK`: Successfully echoed the request details as a JSON object.


        Note: While this handler is registered for `/anything` and
        `/anything/*path`,

        the OpenAPI documentation for `/anything/*path` is handled by
        `anything_path_handler`

        due to current limitations in `utoipa` with wildcard path parameters in
        a single handler.
      operationId: anything_handler
      parameters:
        - name: connection
          in: query
          description: "Set to `close` to force a `Connection: close` response and hang up
            the connection afterward (HTTP/1.1 only; ignored over HTTP/2)"
          required: false
          schema:
            type: string
            nullable: true
      requestBody:
        description: ""
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
        required: true
      responses:
        "200":
          description: Echoes request details (includes a `tls` object over HTTPS; a
            `connection` field when `?connection=close` is set)
          content:
            application/json:
              schema: {}
```
