0.0
The project is in a healthy, maintained state
Mounts a Bruno-like UI inside your Rails app for ad-hoc HTTP requests, persisting collections as .bru files that are interchangeable with Bruno.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 7.0
 Project Readme

rails-http-lab

In-app HTTP request lab for Rails. Mounts a UI at /rails/http-lab and persists collections as .bru files that are interchangeable with the Bruno desktop app.

No external app, no separate workspace — your requests live next to the code that serves them, version-controlled in docs/http-lab/.

Rails HTTP Lab

Why

Postman / Insomnia / Bruno are great, but every one of them lives outside your Rails app and outside your repo. With rails-http-lab:

  • Requests are files in the repo (docs/http-lab/*.bru), reviewable in PRs.
  • The UI runs inside your Rails app — no CORS, can reach internal services.
  • Files use the Bruno format, so the same collection opens in Bruno desktop. Round-trip is byte-stable (verified against the public Bruno corpus).

Install

# Gemfile
gem "rails-http-lab", group: :development
bundle install
bin/rails g rails_http_lab:install

Visit http://localhost:3000/rails/http-lab.

Configuration

config/initializers/rails_http_lab.rb:

RailsHttpLab.configure do |c|
  c.mount_path   = "/rails/http-lab"                # default
  c.storage_path = Rails.root.join("docs/http-lab") # default
  c.enabled_envs = %i[development]                  # default
  # c.authenticator = ->(request) { request.session[:admin] }
end

Security

The executor performs HTTP requests from the Rails server. That's the point — it lets you reach internal services without CORS. It is also a confused-deputy risk if exposed to untrusted users. Defaults:

  • Enabled only in development (enabled_envs).
  • Enabling in production requires an authenticator callable; the engine refuses to boot otherwise.
  • Bruno script and tests blocks are persisted but not executed to avoid arbitrary code execution. Run them in Bruno itself.

License

MIT