Is is possible to make a cURL request and get the route that is taken (similar to traceroute)

DanielD picture DanielD · Jul 19, 2017 · Viewed 21.4k times · Source

I have a GET request with header params and I want to check which db instance my app is using. Is there a way I could build a cURL request that would tell me where my request is going? I know there is a traceroute command which displays all the server hops. But is there something similar to that using a cURL?

Answer

trial999 picture trial999 · Jul 11, 2019

For a slightly better formatted output to stdout

curl --trace-ascii - <host>