EU Parliament Monitor — API Documentation - v1.0.11
    Preparing search index...
    • JSON-RPC handler for the proxy's fetch_url method.

      Validates the requested URL against the IMF allow-list (protocol, hostname, path prefix), forwards it via fetchImpl, and returns the response body wrapped in a JSON-RPC success envelope. Disallowed URLs return a JSON-RPC error envelope rather than throwing.

      Parameters

      • id: string | number | null

        JSON-RPC request id to echo back in the response.

      • url: string | undefined

        Absolute URL the agent is requesting.

      • fetchImpl: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        } = globalThis.fetch

        fetch implementation (overridable for tests).

          • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
          • Parameters

            • input: URL | RequestInfo
            • Optionalinit: RequestInit

            Returns Promise<Response>

          • (input: string | URL | Request, init?: RequestInit): Promise<Response>
          • Parameters

            • input: string | URL | Request
            • Optionalinit: RequestInit

            Returns Promise<Response>

      Returns Promise<JsonRpcSuccess | JsonRpcError>

      A JSON-RPC success envelope with the response body, or an error envelope describing why the URL was rejected.