Passby

100% Elixir, 0-dependency HTTP mock server for testing HTTP clients — drop-in replacement for Bypass.

v0.2.0 Elixir MIT

Passby is a lightweight, 0-dependency HTTP mock server for testing HTTP clients and integrations, providing the same API and semantics as Bypass without dragging in plug, cowboy, ranch, or telemetry.

  • 0 runtime dependencies: built entirely on :gen_tcp, :inet, and :erlang.decode_packet.
  • Drop-in Bypass API: open/1, expect/2,4, expect_once/2,4, stub/4, pass/1, down/1, and up/1.
  • Plug.Conn compatibility: Passby.Conn supports resp/3, send_resp/1, get_req_header/2, put_resp_header/3, fetch_query_params/1, route :param segments, and bracketed query parameters.

Installation

def deps do
  [
    {:passby, "~> 0.2", only: :test}
  ]
end