Sending body data in Base64 since json_encode fails on some posts.
Set proper header for json data.