Skip to content
This repository was archived by the owner on Sep 28, 2023. It is now read-only.

Adding default value to follow redirect#10

Open
luanpotter wants to merge 1 commit into
despegar:masterfrom
luanpotter:default-follow-redirect
Open

Adding default value to follow redirect#10
luanpotter wants to merge 1 commit into
despegar:masterfrom
luanpotter:default-follow-redirect

Conversation

@luanpotter

Copy link
Copy Markdown
Contributor

Adding default value to follow redirect, in order to make API simpler to use in general.

It can be set on the constructor, and it is true by default.

Every method gets an overload that doesn't require the followRedirect flag and uses the default value provided.

I think in most use cases all the requests in the tests will use the same value for this, so this change make the API a bit simpler to use in some cases.

Please let me know what you think!

I've also added a test to verify this case.

@ferwasy ferwasy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that these changes are OK. But I would create a different test class for the case of "not follow redirect" SparkServer, so it can be a @ClassRule and not created inside the test method (notice that the server instances are not stopped).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants