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

Viewed 33847

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?

2 Answers

For a slightly better formatted output to stdout

curl --trace-ascii - <host> 

You can use --trace option: --trace FILE Write a debug trace to FILE

curl --trace trace.txt yourdomain.com

(You cannot use trace and verbose at the same time, trace overrides it)

Related