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

Implement Bastion test plugins #71

Open
KPull opened this issue Jan 8, 2017 · 2 comments
Open

Implement Bastion test plugins #71

KPull opened this issue Jan 8, 2017 · 2 comments
Milestone

Comments

@KPull
Copy link
Member

KPull commented Jan 8, 2017

The Bastion fluent-build has a method, thenDo() which takes a Callback function object which gets executed after the request is performed. Now that Bastion has been active for quite a while, it seems this method is not really being used for anything and could be removed for our initial release. Remember that if someone wants to do something after a request, they can just type out their code as normal after the Bastion.request()...call() statement.

Alternatively, we can also change the concept into something like a withPlugins() method which takes a series of Plugin objects. This let's you configure how Bastion performs the request and what to do when it receives a response. A use-case I can think of, which is available in other REST libraries, would be something like a CookieHandler which automatically sets new cookies in the response into Bastion's globals().

@KPull KPull added this to the 0.6-BETA milestone Jan 8, 2017
@KPull
Copy link
Member Author

KPull commented Jan 8, 2017

And then we could even have something in the Basion Configuration for Plugins. So, for example, if you plan on performing multiple requests which need to handle cookies, then you could do something like
Bastion.plugins().add(new CookieHandler()) and it would apply to all Bastion requests.

@KPull KPull changed the title Remove the thenDo() fluent-build method Remove the thenDo() fluent-builder method Jan 9, 2017
KPull added a commit to KPull/Bastion that referenced this issue Jan 23, 2017
KPull added a commit that referenced this issue Mar 31, 2017
#71: Removed the thenDo() fluent-builder method.
@KPull
Copy link
Member Author

KPull commented Mar 31, 2017

Merged removing thenDo() in #84.

@KPull KPull closed this as completed Mar 31, 2017
@KPull KPull reopened this Mar 31, 2017
@KPull KPull changed the title Remove the thenDo() fluent-builder method Implement Bastion test plugins Mar 31, 2017
@KPull KPull modified the milestones: 0.6-BETA, 1.0 Mar 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant