Take in an optional `data array` argument that contains pre-encoded elements to send as post data if JSON doesn't exist (see further line notes below).