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

Adding default value to follow redirect #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

luanpotter
Copy link
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.

Copy link
Contributor

@ferwasy ferwasy left a comment

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