Better format curl command (Network-Tab -> Copy as cURL address)

Hello,

when using the “Copy a request as cURL address” function in dev tools network tab, it would be great if the command could be a little formatted with line breaks. So you could more easily customize the curl command in an editor afterwards.

Example:
Currently a copied cURL command looks like this:

curl 'https://example.org -H 'Accept: application/json' -H 'Accept-Language: en,de;q=0.7,en-US;q=0.3' -H 'Accept-Encoding: gzip, deflate, br -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:123.0) Gecko/20100101 Firefox/123.0' ....

so everything in one line, hard to find specific headers

It would improve the UX greatly if only some (shell compatible) line breaks would be added, and it would look like so:

curl 'https://example.org \
-H 'Accept: application/json' \
-H 'Accept-Language: en,de;q=0.7,en-US;q=0.3' \
-H 'Accept-Encoding: gzip, deflate, br ' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:123.0) Gecko/20100101 Firefox/123.0' 

Would really improve working with that for me :slight_smile:

1 Like