惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
aimingoo的专栏
aimingoo的专栏
腾讯CDC
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
F
Fortinet All Blogs
G
Google Developers Blog
MongoDB | Blog
MongoDB | Blog
Microsoft Azure Blog
Microsoft Azure Blog
小众软件
小众软件
Engineering at Meta
Engineering at Meta
博客园_首页
B
Blog RSS Feed
D
Docker
M
MIT News - Artificial intelligence
爱范儿
爱范儿
I
InfoQ

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
You already have .http files — I built a zero-dependency ...
benjamin · 2026-06-15 · via DEV Community
Cover image for You already have .http files — I built a zero-dependency CLI to run them outside VS Code

benjamin

If you use VS Code, you probably have .http files sitting in your repo — the ones the REST Client extension runs when you click "Send Request". They're great: requests live next to your code, in version control, in plain text.

Then you want to run one from a terminal, or in CI, and... you can't. The extension only works inside the editor. So your options become:

  • Fire up Postman / Insomnia — a GUI app and an account, to send one GET.
  • Switch to Hurl — excellent, but it uses its own .hurl format; your existing .http files don't run in it.
  • Use httpyac — it does run .http files, but pulls in dozens of dependencies.
  • Hand-translate the request into a wall of curl -H flags. Again.

I wanted to run the files I already have. So I built runhttp: it runs your .http files (REST Client format) from the command line, with zero dependencies.

npx runhttp api.http

Given this file:

@base = https://api.example.com
@token = {{$env API_TOKEN}}

### Get the current user
GET {{base}}/me
Authorization: Bearer {{token}}
Accept: application/json

you get:

GET https://api.example.com/me   # Get the current user
  200 OK · 142ms · application/json · 318 B
  {
    "id": 7,
    "name": "Ada Lovelace"
  }

What it does

  • Runs every request in the file, or just one: -n 2, or --name "Get the current user".
  • @variables and {{placeholders}}, plus {{$env TOKEN}} to pull secrets from the environment (so tokens never get committed) and --var key=value to override from the CLI.
  • Follows redirects, pretty-prints JSON, --list to see what's in a file, --json for machine-readable output, -i to include response headers.
  • An undefined variable is an error — a {{typo}} never gets silently sent to the wire.

Built for scripts and CI

exit 0   every request came back < 400
exit 1   some request returned an HTTP status >= 400
exit 2   parse error, connection failure, or bad usage

runhttp smoke.http && echo "all endpoints healthy"

Scope, on purpose

It handles the everyday .http: variables, headers, bodies, multiple requests per file, redirects. It deliberately does not do gRPC/WebSocket/GraphQL transports or response assertions — if you need those, httpyac and Hurl are great. runhttp is the small, dependency-free one for the 90% case, and the Node and Python ports are behavior-identical: same flags, same exit codes.

Install

npx runhttp api.http       # Node >= 18
pip install runhttp        # Python >= 3.8

What do you reach for when you need to run a saved request outside the editor — Postman, curl, an extension, something else? And is sticking to the REST Client .http format the right call, or do you wish there were one universal format for this?