added option to send custom headers in POST request