Updated to increase usability by adding the ability to set Content-Type ...

...on invocation.

Added Headers parameter to invocation as well as a setHeaders function
since using the entire response object is uneccessary.

Left deprecated functionality intact for backwards compatibility.