klotz: http* + api*

0 bookmark(s) - Sort by: Date โ†“ / Title / - Bookmarks from other users for this tag

  1. Cloudflare is now returning RFC 9457-compliant structured Markdown and JSON error payloads to AI agents, replacing verbose HTML error pages with machine-readable instructions. This significantly reduces payload size and token usage โ€“ by over 98% in measured tests โ€“ which is crucial for cost-effective AI agent operation. The new responses include actionable guidance, allowing agents to understand *why* an error occurred and *how* to proceed, whether that means retrying with backoff, escalating the issue, or stopping altogether.
    This is a network-wide change, automatically available without any site owner configuration.

    - `Accept: text/markdown` returns a yaml header and human readable markdown
    - `Accept: application/json` returns JSON
    - `Accept: application/problem+json` returns JSON with the `application/problem+json` content type.
  2. RFC 9457 defines a standardized format for communicating error details in HTTP API responses, known as "problem details."
    - Supersedes RFC 7807,
    - Core fields include 'type', 'title', 'detail' and 'instance'.
    - Generally paired with 4xx/5xx HTTP status codes.
    - Content types `application/problem+xml`, `application/problem+json`

    Example:
    ```
    {
    "type": "https://example.com/probs/invalid-input",
    "title": "Invalid Input",
    "status": 400,
    "detail": "The provided 'age' value must be a positive integer.",
    "instance": "/users/123",
    "age": -5
    }
    ```
  3. Interact with opencode server over HTTP. The `opencode serve` command runs a headless HTTP server that exposes an OpenAPI endpoint that an opencode client can use.
  4. 2021-06-29 Tags: , , , , , , , , by klotz
  5. 2020-05-22 Tags: , , , , , by klotz
  6. There is no need for you to create custom headers or authentication schemes at all.

    The Bearer authentication scheme is designed exactly for your use case:

    Authorization: Bearer e1d9753f-a508-46cc-a428-1787595d63e4
    2015-08-30 Tags: , , by klotz

Top of the page

First / Previous / Next / Last / Page 1 of 0 SemanticScuttle - klotz.me: Tags: http + api

About - Propulsed by SemanticScuttle