How To Create Test Server for External Service Testing?

I want to do something like
to stub a http response when the module or function can’t be mocked.

You can see in golang doc, that I can have ts.URL() to replace my external service URL, hence I can do response stubbing easily.

Is there any way doing in elixir? Or similar libraries?

I use bypass in such cases (unless I misunderstood your question), take a look at it

That might be it, I’ll take a look.

Thank you!