Update to api.php

- Hope it will be useful. I made these changes while trying to use this api in a standalone fashion. It looked like FastlyAPI::post was stuck  with only using POST, and not PURGE, but PURGE seems to be working fine.