how to do “capture HTTP headers in network api response”
ex:
$ curl -i http://api.ping.org/pong
HTTP/1.1 200 OK
Server: nginx/1.2.2
Date: Sun, 19 Jan 2014 07:38:49 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: Express
X-Amz-Cf-Id: NBPLjSE6cr2qIBt1VdanDkNDpJmIP1V9VlqpJlfyHpjkm_ldJH5SVg==
{“pong”:“Response from API”}
i want to store response headers “X-Amz-Cf-Id:” into a variable. how to do it?