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?
Asked
Active
Viewed 4.5k times
28

DanielD
- 1,315
- 4
- 17
- 25
-
2Did you try the `--trace` option? `curl -v -X TRACE http://www.yourserver.com` – Dalton Cézane Jul 18 '17 at 23:52
3 Answers
21
For a slightly better formatted output to stdout
curl --trace-ascii - <host>

trial999
- 1,646
- 6
- 21
- 36
-
4this does not answer the question because I cannot find a route in this output !?! just the TLS hansdshake – U.V. May 10 '23 at 09:47
10
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)

Fabián Bertetto
- 1,721
- 17
- 14
-
14I tried this, but the resulting file doesn't seem to display the IP addresses of the machine at each hop of the request. – BobbyA Mar 25 '19 at 21:01
-
1this does not answer the question because I cannot find a route in this output !?! just the TLS hansdshake – U.V. May 10 '23 at 09:47
0
curl -L -v --noproxy '*' --trace-ascii data.txt https://example.com
-L
will follow the redirects
-v
is for verbose
--noproxy '*'
This flag instructs curl to not use any proxy and connect directly to https://example.com
--trace-ascii data.txt
: Will store the output in data.txt

Udesh
- 2,415
- 2
- 22
- 32