Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:1jehuang Jcode HTTP Client

From Leeroopedia
Knowledge Sources
Domains Infrastructure, Networking
Last Updated 2026-10-18 00:00 GMT

Overview

reqwest HTTP client (v0.12) with rustls TLS, providing outbound HTTP for provider diagnostics, Jev Decisions API calls, and memory relevance scoring.

Description

The HTTP Client environment uses reqwest 0.12 configured with rustls-based TLS (no OpenSSL dependency) and native root certificates. It supports JSON serialization, HTTP/2, and system proxy configuration. This client is used for all outbound HTTP traffic including provider end-to-end diagnostics, Jev Typed Decisions API requests (bounded at 80 KiB), and memory relevance scoring batch requests.

Usage

Use this environment for run_provider_e2e (provider diagnostics that make real API calls), JevClient (Jev Decisions transport), and memory_jev_recall (batched relevance scoring). It is the mandatory HTTP transport for any code path that communicates with external APIs over HTTP.

System Requirements

Category Requirement Notes
OS Cross-platform Linux, macOS, Windows
Hardware Any Network-bound, not CPU-bound
Network Outbound HTTPS TLS 1.2+ required by most providers

Dependencies

Rust Packages

  • `reqwest` = 0.12, features: ["json", "charset", "http2", "system-proxy", "rustls-tls", "rustls-tls-native-roots"]
  • `rustls` = 0.23, features: ["aws_lc_rs"]
  • `tokio-tungstenite` = 0.24 (WebSocket, features: ["connect", "rustls-tls-native-roots"])

Credentials

Provider API keys are passed at runtime (not stored in the HTTP client environment itself):

  • `OPENAI_API_KEY` — OpenAI provider access
  • `ANTHROPIC_API_KEY` — Anthropic/Claude provider access
  • Other provider keys as configured via jcode account login

Quick Install

# reqwest is pulled in automatically via Cargo.toml:
# reqwest = { version = "0.12", default-features = false,
#   features = ["json", "charset", "http2", "system-proxy",
#     "rustls-tls", "rustls-tls-native-roots"] }

cargo build --profile selfdev

Code Evidence

HTTP client dependency from Cargo.toml:147-149:

# HTTP client
reqwest = { version = "0.12", default-features = false, features = ["json", "charset", "http2", "system-proxy", "rustls-tls", "rustls-tls-native-roots"] }
rustls = { version = "0.23", default-features = false, features = ["aws_lc_rs"] }
tokio-tungstenite = { version = "0.24", default-features = false, features = ["connect", "rustls-tls-native-roots"] }

Common Errors

Error Message Cause Solution
`error sending request` Network unreachable or proxy misconfigured Check HTTPS_PROXY env var; system-proxy feature respects it
`invalid certificate` Missing native root certs Install ca-certificates package (Linux)
`Jev request exceeds the bounded context size` Request body > 80 KiB Reduce memory batch size or candidates count

Compatibility Notes

  • No OpenSSL dependency: Uses rustls with aws_lc_rs provider instead of OpenSSL, avoiding system library conflicts.
  • Linux compat (CentOS 7): The linux-compat-vendored-openssl feature bundles a compatible OpenSSL for the glibc 2.17 baseline.
  • System proxy: The system-proxy feature respects HTTP_PROXY/HTTPS_PROXY environment variables.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment