3 ms·
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 usi
by thih9 3y ago
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?
- paol 3y agoSounds like mockserver[0] might be what you want. [0] https://www.mock-server.com/ https://www.mock-server.com/
- deleted 3y ago[deleted]
- cyunker 3y agoI've been using https://httpbin.org/ 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.
- ricekot 3y agoI 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/ https://www.zaproxy.org/ [2]: https://www.zaproxy.org/blog/2022-09-13-zap-extender-scripts/#use-zap-as-a-web-server https://www.zaproxy.org/blog/2022-09-13-zap-extender-scripts...
- notRobot 3y ago<?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.
- emmanueloga_ 3y agoSound like you need https://mitmproxy.org/#mitmweb https://mitmproxy.org/#mitmweb
- lelanthran 3y ago> 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 https://www.youtube.com/watch?v=kpsFSY-G5F0