Rucho

Handles OPTIONS requests to `/options`.

Responds with the allowed HTTP methods for this server in the Allow header.
The body of the response is empty.

HTTP Method:

  • OPTIONS

Responses:

  • 204 No Content: Returns an empty body with the Allow header set to
    “GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD”.
options
https://rucho.org/options

Response

204

No content, Allow header lists allowed methods

options/options
 
204

Handles PATCH requests to `/patch`.

Echoes back the request’s method, headers, and the parsed JSON body.
Expects a JSON request body.

HTTP Method:

  • PATCH

Request Body:

  • Payload: A generic JSON object.

Responses:

  • 200 OK: Returns a JSON object containing method, headers, and parsed body.
  • 400 Bad Request: If the request body is not valid JSON.
patch
https://rucho.org/patch

Body

application/json

Payload

Payload

Request payload wrapper for POST, PUT, PATCH, and DELETE handlers.

This newtype wraps a serde_json::Value to accept arbitrary JSON bodies
in requests that support request bodies.

Response

application/json

Echoes request details

patch/patch

Body

{}
 
application/json

Handles POST requests to `/post`.

Echoes back the request’s method, headers, and the parsed JSON body.
Expects a JSON request body.

HTTP Method:

  • POST

Request Body:

  • Payload: A generic JSON object.

Responses:

  • 200 OK: Returns a JSON object containing method, headers, and parsed body.
  • 400 Bad Request: If the request body is not valid JSON.
post
https://rucho.org/post

Body

application/json

Payload

Payload

Request payload wrapper for POST, PUT, PATCH, and DELETE handlers.

This newtype wraps a serde_json::Value to accept arbitrary JSON bodies
in requests that support request bodies.

Response

application/json

Echoes request details

post/post

Body

{}
 
application/json

Handles PUT requests to `/put`.

Echoes back the request’s method, headers, and the parsed JSON body.
Expects a JSON request body.

HTTP Method:

  • PUT

Request Body:

  • Payload: A generic JSON object.

Responses:

  • 200 OK: Returns a JSON object containing method, headers, and parsed body.
  • 400 Bad Request: If the request body is not valid JSON.
put
https://rucho.org/put

Body

application/json

Payload

Payload

Request payload wrapper for POST, PUT, PATCH, and DELETE handlers.

This newtype wraps a serde_json::Value to accept arbitrary JSON bodies
in requests that support request bodies.

Response

application/json

Echoes request details

put/put

Body

{}
 
application/json

Responds with the HTTP status code specified in the path.

This handler allows testing of how a client handles different HTTP status codes.
It accepts any HTTP method.

Path Parameters:

  • code: The HTTP status code to return (e.g., 200, 404, 500).

Responses:

  • Returns the status code specified by the code path parameter.
  • If an invalid code is provided (e.g., not a number or out of valid range),
    it defaults to 400 Bad Request.
head
https://rucho.org/status/{code}

Path Parameters

codeinteger(int32)required

>= 0

Response

Returns the specified status code

head/status/{code}