api_post_request function

Wrapper of httr::POST that handles status errors and custom headers