execution refactoring

just some refactoring to make the execution of workflows and requests more transparent
<a href='#crh-start'></a><a href='#crh-data-%7B%22processed%22%3A%20%5B%22https%3A//github.com/EnoF/con-rest/pull/33%23discussion_r21680269%22%2C%20%22https%3A//github.com/EnoF/con-rest/pull/33%23issuecomment-66629875%22%5D%2C%20%22comments%22%3A%20%7B%22General%20Comment%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/EnoF/con-rest/pull/33%23issuecomment-66629875%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Looks%20good%20%3A%2B1%3A%20Will%20the%20workflow%20also%20be%20handled%20in%20this%20pull%20request%3F%20%5Cr%5Cn%5Cr%5CnI%27d%20recommend%20to%20do%20that%20in%20a%20separate%20one.%20If%20you%20rebase%20it%2C%20I%27ll%20merge%20it%20%3A%29%22%2C%20%22created_at%22%3A%20%222014-12-11T14%3A56%3A32Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%5D%2C%20%22title%22%3A%20%22General%20Comment%22%7D%2C%20%22Pull%208d24d57514942be1041e0b2704c3f9e6d1f2ff6a%20server/api.js%2012%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/EnoF/con-rest/pull/33%23discussion_r21680269%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Just%20to%20confirm%2C%20since%20I%20don%27t%20know%20_%20that%20well%2C%20the%20provided%20headers%20can%20overwrite%20the%20user%20agent%20right%3F%22%2C%20%22created_at%22%3A%20%222014-12-11T14%3A53%3A17Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20server/api.js%3AL232-296%22%7D%7D%7D'></a>
<a href='https://www.codereviewhub.com/'><img src='http://www.codereviewhub.com/site/github-bar.png' height=40></a>
- [ ] <a href='#crh-comment-Pull 8d24d57514942be1041e0b2704c3f9e6d1f2ff6a server/api.js 12'></a> <img src='http://www.codereviewhub.com/site/github-remaining.png' height=16 width=60>&nbsp;<b><a href='https://github.com/EnoF/con-rest/pull/33#discussion_r21680269'>File: server/api.js:L232-296</a></b>
- <a href='https://github.com/EnoF'><img border=0 src='https://avatars.githubusercontent.com/u/1508400?v=3' height=16 width=16'></a> Just to confirm, since I don't know _ that well, the provided headers can overwrite the user agent right?
- [x] <a href='#crh-comment-General Comment'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/EnoF/con-rest/pull/33#issuecomment-66629875'>General Comment</a></b>
- <a href='https://github.com/EnoF'><img border=0 src='https://avatars.githubusercontent.com/u/1508400?v=3' height=16 width=16'></a> Looks good :+1: Will the workflow also be handled in this pull request?
I'd recommend to do that in a separate one. If you rebase it, I'll merge it :)


<a href='https://www.codereviewhub.com/EnoF/con-rest/pull/33?mark_as_completed=1'><img src='http://www.codereviewhub.com/site/github-mark-as-completed.png' height=26></a>&nbsp;<a href='https://www.codereviewhub.com/EnoF/con-rest/pull/33?approve=1'><img src='http://www.codereviewhub.com/site/github-approve.png' height=26></a>&nbsp;<a href='https://github.com/EnoF/con-rest/pull/33'><img src='http://www.codereviewhub.com/site/github-refresh.png' height=26></a>
<a href='#crh-end'></a>
If a user-agent is provided in the headers, the defaultHeaders is not used but the provided one