Try to separate your login between internal business actors that you can unit test and a gateway sub-system to connect to external systems.
The gateway would translate all the connection logic from the external domain to your internal domain, including errors and other possible states. You could need to handle state and/or any kind of retry logic/failure compensation etc.
The external system (http) would appear as a message-driven actor to your bounded context, speaking your domain language, thus being unit testable.
The gateway subsystem will be independently integration-tested. You could have a mock http server in your integration tests to verify the external calls and the translation.
Cheers
G