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.5

用法

来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。

import std;
import mcpplibs.tinyhttps;

int main() {
    using namespace mcpplibs::tinyhttps;

    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.
    const auto status = parse_status_line("HTTP/1.1 200 OK");
    const auto not_a_status = parse_status_line("BBBB 999 XHTTP/1.1 200 OK");

    // 0.3.0: adding fields to this aggregate left four-initialiser
    // brace-initialisation working, which is the whole compatibility claim.
    HttpResponse response{204, "No Content", {}, {}};

    // 0.3.4: a stop token on all three entry points. One stopped before the
// …

tests/examples/tinyhttps/tests/api.cpp · 项目 tests/examples/tinyhttps

openkal

目标结果环境测试项目首条诊断
x86_64-linux-gnurunsposixtinyhttps
x86_64-windows-muslrunsposixtinyhttps

测量方式

2026-09-23 由 tests/openkal/compat.py 测得,使用 openkal-llvm-runtime 0.15.1、llvm@22.1.8、mcpp 2026.9.21.3。测试项目没有自行选择平台依赖。 上方徽章是所有已测目标里最严格那个的结果 —— 上表列出每个目标各自的环境。

构建 · 上游清单

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

版本

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