HTTP responses have status codes as well as bodies. A page that says not found is still printable output unless the client treats its status as a failure. curl with the fail option makes error statuses visible to shell control flow; the silent option reduces progress noise. Select the exact endpoint and preserve its body in the requested file.
All endpoints here are mocked local fixtures, so you can't accidentally send a request outside the exercise. curl -f returns a nonzero shell status for an HTTP error response, so a caller can stop or recover. A 404 body and a health response can both contain readable text; inspect the route and status before treating either as evidence of availability. Redirect the successful body to the destination required by the handoff.