Readit News logoReadit News
dhuan_ commented on Ask HN: What Are You Working On? (March 2026)    · Posted by u/david927
dhuan_ · 5 days ago
mock, an API creation and testing utility. Any feedback is welcome.

https://dhuan.github.io/mock/latest/examples.html

dhuan_ commented on Ask HN: What are you working on? (January 2026)    · Posted by u/david927
dhuan_ · 2 months ago
mock, an API creation and testing utility. Any feedback is welcome!

https://dhuan.github.io/mock/latest/examples.html

dhuan_ commented on Charles Proxy   charlesproxy.com/... · Posted by u/handfuloflight
dhuan_ · 3 months ago
I’ve found tools like Charles really useful for understanding what’s happening on the wire. When I need something more repeatable (tests, offline work), I usually reach for a mock server instead. I ended up building a small one for my own use and later open-sourced it:

https://dhuan.github.io/mock/latest/examples.html

dhuan_ commented on Ask HN: What Are You Working On? (December 2025)    · Posted by u/david927
dhuan_ · 3 months ago
mock, an API creation and testing utility. Any feedback is welcome!

https://dhuan.github.io/mock/latest/examples.html

dhuan_ commented on An overly aggressive mock can work fine, but break much later   nedbatchelder.com/blog/20... · Posted by u/ingve
dhuan_ · 4 months ago
Great article. In addition, updating your mocking code can often be time-consuming. To try to make this easier, I built mock[1], which streamlines the process of setting up mock services for testing.

https://dhuan.github.io/mock/latest/examples.html

dhuan_ commented on Ask HN: What Are You Working On? (Nov 2025)    · Posted by u/david927
dhuan_ · 4 months ago
mock, an API creation and testing utility. Any feedback is welcome!

https://dhuan.github.io/mock/latest/examples.html

dhuan_ commented on Show HN: Command line YouTube downloader,a universal media solution for everyone   github.com/Saffron-sh/m2m... · Posted by u/saffron-sh
dhuan_ · 4 months ago
It's also possible create an HTTP service that acts as a wrapper to yt-dlp with just a few lines of shell, I created this example in the following link:

https://dhuan.github.io/mock/latest/examples.html#youtube-do...

dhuan_ commented on Mock – An API creation and testing utility: Examples   dhuan.github.io/mock/late... · Posted by u/dhuan_
fhduksbegd · 4 months ago
How does this differ from swagger?
dhuan_ · 4 months ago
Swagger is a tool for API design and documentation.

Mock on the other hand is an actual API creation utility with which you can define endpoints, execute some logic for each endpoint and then return some data to the client. There are other similar features which are covered in the user guide.

Mock is not: - A tool for API Specs or documentation - A GUI tool.

I admit explaining the usefulness of this tool is not the easiest thing.

Any feedback is welcome!

dhuan_ commented on Mock – An API creation and testing utility: Examples   dhuan.github.io/mock/late... · Posted by u/dhuan_
calrain · 4 months ago
It frustrates me no end when large commercial web sites fail to store state in URLs. It should be updated when the user clicks the 'submit' button of a page, especially when related to searching.

Some products have these fancy KQL style search parameters but if you forget to 'save the search' within the applications 'Save Search' facility, then when you duplicate a tab the search is lost.

It feels rude when sites ignore the UX improvement by not leveraging the power of URLs to store current state.

dhuan_ · 4 months ago
I think you intended to post here: https://news.ycombinator.com/item?id=45789474
dhuan_ commented on Mock – An API creation and testing utility: Examples   dhuan.github.io/mock/late... · Posted by u/dhuan_
ruguo · 4 months ago
Does it support Windows? I don’t see a Windows version on the GitHub releases page.
dhuan_ · 4 months ago
Hi! Not yet, unless you use it with containers.

u/dhuan_

KarmaCake day63September 24, 2022View Original