Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One thing I like doing when working with APIa is to have an echo server at hand.

I.e. something that I can query via curl or via a network library that I’m using, and see in response what kind of request it actually received. It helps me verify that I’m making correct requests (and not misusing curl or a network library).

Currently I google for that and use the first online result that comes up. Is there an open source local equivalent, or does Bruno offer some solution for that?



I've been using https://httpbin.org/ to so some client testing and so far it has been great. They provide a docker image which makes it easy to run locally.


> One thing I like doing when working with APIa is to have an echo server at hand.

> I.e. something that I can query via curl or via a network library that I’m using, and see in response what kind of request it actually received. It helps me verify that I’m making correct requests (and not misusing curl or a network library).

Did you consider using a proxy during development. A man-in-the-middle server that does nothing but relay and record all communications between client and server?

I made one specifically for this use-case. See it in action (3m video): https://www.youtube.com/watch?v=kpsFSY-G5F0


I use ZAP [1] with the OAST add-on for this at the moment. I admit the UX isn't perfect, but it serves my purpose.

If I also want control over the responses (e.g. return a 401 status code for every fifth request), I have a custom extender script [2] for that.

[1]: https://www.zaproxy.org/

[2]: https://www.zaproxy.org/blog/2022-09-13-zap-extender-scripts...


    <?php
    print_r($_POST);
    print_r($_GET);
If all you need is an echo, should be as simple as this in a .php file, no? Can be deployed with PHP's built-in webserver.


Sounds like mockserver[0] might be what you want.

[0] https://www.mock-server.com/


Sound like you need https://mitmproxy.org/#mitmweb




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: