News for hackers. Stuff that matters.
Re:Tips to prevent adoption of your API by cuillevel3 on Thursday June 17, 2021 @04:28AM (#27537345)
Depends on the API and how much testing you need. You want to test your code, not the API's availability or correctness.

But it can be as easy as using a fake http library and mocking the responses, or using a httptest server: https://onsi.github.io/gomega/#ghttp-testing-http-clients

If the API is complicated and you have to write your own fake server, that might not make sense for small projects.

There are no comments on this comment yet.