Added support for custom headers

Feel free to merge in this change to add support for custom headers. Tested on iOS.