Skip to content
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

Allow user to specify protocol for custom endpoint #5

Merged
merged 1 commit into from Sep 15, 2020

Conversation

jacksgt
Copy link
Contributor

@jacksgt jacksgt commented Sep 14, 2020

First of all, thanks for this simple-to-use and dependency-free library!

In local setups, such as a Minio [1] instance in a Docker container,
the protocol may not always be HTTPS (like for public production
endpoints), but instead just plain HTTP.
To support this use-case, the user can specify a protocol at the
beginning of the custom endpoint URI (either http:// or https://).

To maintain backwards compatibility, the protocol defaults to HTTPS.

The patch also includes a test case to assert this behavior.

[1] https://hub.docker.com/r/minio/minio

Copy link
Owner

@rhnvrm rhnvrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey,

This looks good to add, I have suggested a few changes.

simples3.go Outdated Show resolved Hide resolved
simples3.go Outdated Show resolved Hide resolved
In local setups, such as a Minio [1] instance in a Docker container,
the protocol may not always be HTTPS (like for public production
endpoints), but instead just plain HTTP.
To support this use-case, the user can specify a protocol at the
beginning of the custom endpoint URI (either http:// or https://).

To maintain backwards compatibility, the protocol defaults to HTTPS.

The patch also includes a test case to assert this behavior.

[1] https://hub.docker.com/r/minio/minio
@rhnvrm
Copy link
Owner

rhnvrm commented Sep 15, 2020

LGTM 👍

@rhnvrm rhnvrm merged commit 59b9f0b into rhnvrm:master Sep 15, 2020
@jacksgt
Copy link
Contributor Author

jacksgt commented Sep 15, 2020

Excellent, thanks for the super quick response!

@jacksgt jacksgt deleted the http-protocol branch September 15, 2020 08:20
@rhnvrm
Copy link
Owner

rhnvrm commented Sep 15, 2020

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants