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, andup/1. -
Plug.Conn compatibility:
Passby.Connsupportsresp/3,send_resp/1,get_req_header/2,put_resp_header/3,fetch_query_params/1, route:paramsegments, and bracketed query parameters.
Installation
def deps do
[
{:passby, "~> 0.2", only: :test}
]
end