Added cross origin functionality and the ability to pass in request headers

This helps connect to an API that is not served up on the same domain.