How to Use curl to Get Info When Posting a Request? or Can curl Get Info When Posting Data? How?

22 Replies, 1956 Views

For timing, `-w "@format.txt"` lets you customize the output. Save this to `format.txt`:

```
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_total: %{time_total}\n
```

Now run `curl -w "@format.txt" [url]`. Super clean for curl get info when post!
Not sure if this helps, but `-I` (HEAD) is handy if you just want headers without sending data.

For curl get info when post, `-i` is better since you’re sending a POST. Combine it with `-v` if you need the full breakdown.



Users browsing this thread: 1 Guest(s)