Q:

How to send a request with current coverage in post-Integration script using Xcode Server?

I setup a bot to perform my continuous integration. But I need to send info about coverage to my database using its own API. 
Using following address: http://lb.mycompany.org/api/public/metrics I need to send a POST with following parameters:
{"project_public_id": "myprojectid", "type": "coverage", "value": "50", "platform": "ios"}

How can I do this? How to access code coverage from within trigger script?

A:

You can use, but I don't know how to get coverage value. Example for XCS_TESTS_COUNT:
curl -i -X POST -H "Content-Type:application/json" your_http_address -d '{"value":'$XCS_TESTS_COUNT'}'

