Show HN: A simple echo server for testing HTTP clients (echoserver.dev)
With "echoserver," users can generate custom responses by specifying the desired status code, headers, and response body. This flexibility enables thorough testing of HTTP clients and simplifies the process of verifying client behavior under various scenarios. Whether it's testing error handling, handling specific headers, or evaluating performance under different response sizes, "echoserver" provides a convenient solution.
Overall, "echoserver" aims to streamline the testing process for developers and enhance their ability to verify the functionality and robustness of their HTTP clients. Its simplicity, versatility, and user-friendly interface make it an invaluable tool in the development and testing workflow. I invite the Hacker News community to explore and provide feedback on the app, as I believe it has the potential to greatly benefit developers and testers worldwide.
39 comments
[ 3.6 ms ] story [ 88.3 ms ] threadSomeone made a thing and put it out in the world. Worthy of some upvotes in my view.
I wouldn't consider myself a developer or programmers, but more on the support side. I've made little tools like this when trying to figure out what's going with our proprietary software. By setting up 'fake' servers that dump as much debug information as possible you can get a lot of useful information. Especially when the application developer decides not to put functionality like that in the product in the first place.
It's a self hosted zero dependency / single file Python based echo server. You run `webserver 8000` and then you can make HTTP requests to `localhost:8000` with whatever URL path, headers and payload you want and it'll echo it back.
If you want people to use the hosted version I would suggest adding a basic privacy policy/statement.
A key reason why I don't tend to use hosted versions of these tools is just due to the danger of me sending something to the endpoint that I need to keep confidential. I don't use live/customer data during development, but it could even just be a test API key for a system I'm integrating into - low risk - but still something I wouldn't want hitting an external endpoint.
So you need to give some confidence that you throw away all incoming requests and aren't logging anything.
Secondly, looking at the project overall, to gain some more traction it might be good to add some basic quick-start "how to self host" instructions and possibly publish your released versions to GitHub Releases? I'm guessing you probably would prefer people to use your hosted version but some will never do this (for above reasons). So they'll either go elsewhere - or - you can "capture" that group of people by giving them a good onboarding experience for self-hosting! It does depend on your goals for the project though, and how much time you intend to spend on it.
Edit: deofoo got there before me on the self-host instructions suggestion :-) https://news.ycombinator.com/item?id=36020050
CF-Cache-Status: DYNAMIC CF-Ray: 7cacf9735d5c7373-CPH Connection: keep-alive Date: Sun, 21 May 2023 12:55:33 GMT Server: cloudflare Set-Cookie: __cf_bm=cAVNRtth0_6tpGLa8p2wbe6EuPRO2ZKITru5y9_GYgE-1684673733-0-AUMvqDbcxAHGRLPD2ghFL+6yJ0RKm0kGPtzsiU4jFChGrB02xtkPe8I2OX6+kFApwcWiEI1p+mFNA+esRO58cVI=; path=/; expires=Sun, 21-May-23 13:25:33 GMT; domain=.echoserver.dev; HttpOnly; Secure; SameSite=None Set-Cookie: _cfuvid=wP9ezST2Ks4reP.MMtYKTxisnCjBHSGc65SDqhRDdCU-1684673733888-0-604800000; path=/; domain=.echoserver.dev; HttpOnly; Secure; SameSite=None Transfer-Encoding: chunked Vary: Accept-Encoding alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400 x-render-origin-server: Render
Also, I am using render.com for hosting, and render.com uses Cloudflare internally, so it seems that related headers are also included. However, I believe this should not be a problem for testing purposes.
While I understand the temptation to use LLMs, now I wonder if OP had a genuine intention in advertising their service here, or whether they just wanted free marketing without any effort on their part.
I can also completely understand the motivation to use it on HN, when I make mistakes in my comments, stupid ones like using the wrong word, and then get called out it hurts.
Chin up, you built a useful tool!
I agree if this was one of those empty blog posts; if the whole post is an article generated by an LLM, by all means downvote.
https://github.com/multiprocessio/httpmirror
I made a similar tool which simply outputs the exact HTTP request as received by the server. It's useful to test how the client is mangling URLs or packing request body data. It was actually not so easy to implement, as basically every production web-server mangles the request before making it available. So I wrote it from scratch in C.
It's at http://httpparrot.com/