HTTP Client
Make outbound HTTP requests from ColdBox with hyper — a fluent, builder-style HTTP client.
hyper is the ecosystem's fluent HTTP client for calling external APIs — a builder-style alternative to raw cfhttp/http() calls.
box install hyper📖 Full documentation: hyper.ortusbooks.com
Quick Example
property name="hyper" inject="HyperBuilder@hyper";
var response = hyper
.baseUrl( "https://api.stripe.com/v1" )
.withHeaders( { "Authorization" : "Bearer #settings.stripeKey#" } )
.post( "/charges", {
"amount" : 2000,
"currency" : "usd",
"source" : rc.token
} )
if ( response.isSuccess() ) {
var charge = response.json()
}Why Not Raw http()?
Fluent, readable call sites — headers, auth, query params, bodies compose naturally
Consistent response object —
isSuccess(),json(),statusCode()regardless of engine quirksTestable — fake and assert on requests in your test suite
Reusable clients — pre-configure a builder per API and inject it as a singleton
When to Use It
Consuming third-party REST APIs
Microservice-to-microservice calls
Webhook delivery and verification
See Also
Last updated
Was this helpful?