0

I am building a micro-service using Ratpack. I have a basic understanding of how requests are routed using chaining in ratpack. But what I can't understand is how my server responds to the "/buildinfo" and "/health" requests when I haven't defined any handler for these.

I want to know how I can modify and send some data which I want to as a response to these requests.

1 Answers1

0

It's an inbuilt feature.

Ratpack does provide the HealthCheck interface which you can implement and write your own handler and override the check method to return your desired response when you call /health. You will need to add your new handler to your registry.

This article provides a good explanation and example https://blog.mrhaki.com/2015/11/ratpacked-add-health-checks.html

A Redfearn
  • 506
  • 5
  • 15