mcpp index

mcpplibs.tinyhttps

import

Minimal C++23 HTTP/HTTPS client with SSE streaming support

import mcpplibs.tinyhttps;

模組名讀自上游 src/tinyhttps.cppm 裡的 `export module` 宣告。

mcpp add mcpplibs.tinyhttps@0.3.7

用法

來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。

import std;
import mcpplibs.tinyhttps;

int main() {
    using namespace mcpplibs::tinyhttps;
    // 0.3.6: Winsock is started at the first socket, wherever that is, so
    // the first request on Windows no longer fails with nothing saying why.
    // Read before any request runs (the sends below start it too): the flag
    // is false, then true after the call, which is idempotent.
    const bool notStarted = !Socket::platform_started();
    Socket::ensure_platform_started();
    Socket::ensure_platform_started();
    const bool started = Socket::platform_started();

    const auto request = HttpRequest::post("https://example.invalid/data", "{\"ok\":true}");
    const auto proxy = parse_proxy_url("http://127.0.0.1:8088/path");
    const auto chunk = parse_chunk_size_line("1a");
    const auto invalid_chunk = parse_chunk_size_line("1x");

    // 0.3.0: a status line must be one. The rejected string is the exact input
    // from mcpplibs/tinyhttps#15, where leftover body bytes were mined for
    // digits and reported as an ordinary 999.
// …

tests/examples/tinyhttps/tests/api.cpp · 專案 tests/examples/tinyhttps

openkal

目標結果環境測試專案首條診斷
aarch64-linux-muslrunsposixtinyhttps
x86_64-linux-gnurunsposixtinyhttps
x86_64-linux-muslrunsposixtinyhttps
x86_64-windows-muslfailstinyhttpserror: openkal-llvm-runtime is requested as '0.15.2' by tinyhttps-tests, and the platform openkal-platform 0.32.1 is a version group

測量方式

2026-11-29 由 tests/openkal/compat.py 測得,使用 openkal-llvm-runtime 0.15.2、llvm@22.1.8、mcpp 2026.11.23.1。測試專案沒有自行選擇平台相依。 上方徽章是所有已測目標裡最嚴格那個的結果 —— 上表列出每個目標各自的環境。

建置 · 上游資訊清單

modules
mcpplibs.tinyhttps
targets
tinyhttps (lib)
manifest version
0.3.7
dependencies
compat
來源
https://raw.githubusercontent.com/mcpplibs/tinyhttps/0.3.7/mcpp.toml

版本

版本平台 鏡像sha256
0.3.7 最新 LinuxWindowsmacOS GLOBAL CN b8585bc7e94f…
0.3.6 LinuxWindowsmacOS GLOBAL CN a9d72f53a8ad…
0.3.5 LinuxWindowsmacOS GLOBAL CN 6f75f9e6a630…
0.3.4 LinuxWindowsmacOS GLOBAL CN 26e0e496e053…
0.3.3 LinuxWindowsmacOS GLOBAL CN 18ea1c333d72…
展開全部 18 個版本
0.3.2 LinuxWindowsmacOS GLOBALCN 6c9af965e7e9…
0.3.1 LinuxWindowsmacOS GLOBALCN ba998b6053d4…
0.3.0 LinuxWindowsmacOS GLOBALCN acb4d494bae2…
0.2.10 LinuxWindowsmacOS GLOBALCN 7ab1555ff465…
0.2.9 LinuxWindowsmacOS GLOBALCN b17e0b15d2c2…
0.2.8 LinuxWindowsmacOS GLOBALCN a3d72396b267…
0.2.7 LinuxWindowsmacOS GLOBALCN c8444d0974e8…
0.2.6 LinuxWindowsmacOS GLOBALCN 5e0bbc4b7f20…
0.2.5 LinuxWindowsmacOS GLOBALCN 87084c23d151…
0.2.4 LinuxWindowsmacOS GLOBALCN e9aa33ca770b…
0.2.3 LinuxWindowsmacOS GLOBALCN 67ff75050d31…
0.2.2 LinuxWindowsmacOS GLOBALCN bc4cb5947582…
0.2.1 LinuxWindowsmacOS GLOBALCN 88adc68b1c1e…