Q: How to get Curl header response? I am trying to get the below response from my curl command. My command inserts data into a list and that works perfectly. However, I cannot seem to figure out how to get the below response. 
curl -d "{"""name""":"""ME""","""id""":1}" -H "Content-Type: application/json" -X  PUT http://localhost:8081/api/users
I have tried all of the following. 
curl --trace, curl -v, curl -i, curl -w '%{response_code}'


DEBUG 2018-11-26 16:15:24,853 [http.listener.06 SelectorRunner] [event: ]
org.mule.service.http.impl.service.HttpMessageLogger.HTTP_Listener_config: LISTENER
PUT /api/users HTTP/1.1
Host: localhost:8081
User-Agent: curl/7.54.0
Accept: */*
Content-type:application/json
Content-Length: 18
{"name":"ME","id":1}

DEBUG 2018-11-26 16:15:24,861 [[MuleRuntime].cpuLight.03:
[troubleshooting_myapi].troubleshooting_myapiFlow2.CPU_LITE @541c15d] [event:
0-a0773d60-f1af-11e8-9c18-70886b824af4]
org.mule.service.http.impl.service.HttpMessageLogger.HTTP_Listener_config: LISTENER
HTTP/1.1 200
Content-Type: application/json; charset=UTF-8
Transfer-Encoding: chunked
Date: Mon, 26 Nov 2018 19:15:24 GMT

a9
[
{
"name": "ME",
"id": 1
}
]



A: Try with -D -.
This is what curl -h says about header options
 -D, --dump-header <filename> Write the received headers to <filename>

The - instead of filename indicates the stdout.
curl -D -  -d "{"""name""":"""ME""","""id""":1}" -H "Content-Type: application/json" -X PUT http://localhost:8081/api/users

