Original post

Found out pretty much nice way to mock standard HTTP client requests in using RoundTripper. Check it out. Especially if you are working on some kind of an API wrapper. Works like a charm with zero dependencies. No more adding useless interfaces just to get some abstraction for testing purposes!

Using RoundTripper to mock HTTP method call

submitted by /u/kimrgrey
[link] [comments]