-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor the external package to use an interface #376
Refactor the external package to use an interface #376
Conversation
Looking good, you want to add proof of tests, screenshots |
…ternal request interface
…endExternalRequest
3ce31e8
to
c58bd48
Compare
Signed-off-by: Emmanuel E. Ebenezer <[email protected]>
@samuelIkoli, I've added the tests, the changes I made did not affect endpoint handlers, so I don't think postman screenshots are necessary |
@ekefan Please add screenshot of existing functionalities still working after the refactor, like the calls going through |
@ihechiwilliams, I have added screenshots of existing functionalities |
Made
request
externally configurable to support integration with any external service in hng_boilerplate using the external interfaceSendExternalRequest
Description
Towards resolving #371:
ipstack/
but new external services can be defined in the external package and implemented following theSendExternalRequest
interfaceExternalRequest
to function as a handler for all external servicesChanges:
Modified
to
Factory-based Initialization
New
ExternalRequest
will be created using a factory function, taking a logger and options.Available options:
ExternalRequest
in test mode,ExternalRequest
with ipstack as an external service for sending requestsExternalRequest
, and integrated as options during setupDefined the interface for external services:
Related Issue (Link to Github issue)
Towards resolving #371
How Has This Been Tested?
Unit tested
Screenshots (if appropriate - Postman, etc):
Types of changes
Checklist: