HyperBuilder
A HyperBuilder
is a singleton factory component that will give you a new HyperRequest
any time you call the new
method. It will also create a new HyperRequest
any time you call a method on HyperBuilder
that exists on HyperRequest
.
HyperBuilder
is the component you want to inject into your singleton components, like handlers or services. It will ensure you get a fresh HyperRequest
instance on each invocation. This is important since reusing the same HyperRequest
instance will likely produce unintended results.
You can inject a HyperBuilder
into your application using the HyperBuilder@hyper
id.
If you are not using ColdBox, you can create a HyperBuilder
manually:
Additionally, you can register HyperBuilder
instances as custom HTTP Clients.
Finally, you can enable faking of requests from any HyperBuilder
instance.
Last updated