fix typo; declare $headers and $query before use; send content-type for all non GET requests
@ray37 I made a few minor tweaks to the your library after reviewing :)
- Fixed a typo in word environment
- Fixed the production url not being used correctly
- Ensured $headers and $query were declared before use
- Ensured all non GET, requests have the application/json header sent, previously it was only being sent if the secret key was being sent (and not public key POST requests)