Remove http2curl dependency #368
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of printing http requests to play around with, the API SDK should be easy to use by itself (expose client use cases) & lightweight so it itself can be easily vendored into 3rd party tools (e.g. terraform).
For now, I'd like to remove seemingly unnecessary dependencies (specifically logrus, http2curl & anonuuid), to ease getting my terraform provider for scaleway merged.
Looking at the AWS SDK itself, introducing a customer logger interface looks like the clean solution, which would allow us to re-introduced the http2curl logging functionality by allowing users of the SDK to inject a custom logger, which has functions to log http requests specifically; the user can then decide to use whatever mechanism he sees fit, which would allow us to push this dependency to the user, which should be preferred for an API SDK.
In this PR I'm just removing the http2curl dependency, without introducing a custom logger interface, to keep the PR small. If you like the idea I'll go ahead to get a proper logger interface setup.
The logger interface is required anyway to get logrus & anonuuid out of the picture, but that's a separate discussion.