1

There is a sample in Jira API doc:

curl -D- -X GET -H "Authorization: Basic ZnJlZDpmcmVk" -H "Content-Type: application/json" "http://kelpie9:8081/rest/api/2/issue/QA-31"

What exactly does the -D- parameter mean? There is no description in curl documentation.

I'm also not sure whether -D- and -D mean the same thing.

1 Answer 1

1

It dumps headers to stdout.

The -D flag dumps headers to a file, and the following - instructs it to dump to stdout. From the linked spec:

-D, --dump-header

Write the protocol headers to the specified file.

It doesn't specify for this option, but this works like other options that take a filename:

Use "-" as filename to have the output sent to stdout.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.