Announcing upstream, a mock HTTP server for API and reverse proxy development

53 points implAustin

New crate time! upstream is a mock HTTP server that serves 200s to all requests, and logs them to the terminal. It also generates a short ID for each request, and returns it in a JSON payload.

I've been using this tool to inspect HTTP traffic coming out of webapps and reverse proxies. It can also simulate response size and latency.

If you use NGINX or python -m http.server, consider upstream if:

  • You need the full request contents in your terminal.
  • You need responses for PUT/POST.
  • You want to simulate a real API server with some latency, or large response size.

Links:
GitHub
crates.io