Make purging by url actually purge by url, and catch failures properly

1. The purging by URL should be a POST to an API endpoint, not a PURGE request with a host header.
2. Correctly detect failed responses by looking at the `statusCode` field.  `code` isn't a thing.