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

Merged
merged 3 commits into from Feb 17, 2014

Projects

None yet

2 participants

@isaacs
Collaborator
isaacs commented Feb 16, 2014
  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.
isaacs added some commits Feb 16, 2014
@isaacs isaacs Correct purge API url
Using an outdated purge url that is no longer valid.
fc89329
@isaacs isaacs Status Code is response.statusCode, not response.code 50031b3
@isaacs isaacs Clean up request() param handling
Since the PURGE url is now using their POST endpoint,
no methods are sending a special Host header, so this
parameter is unnecessary.
6ecee95
@thisandagain
Owner

I've obviously been lax in keeping this updated... thank you for the shot in the arm @isaacs

@thisandagain thisandagain merged commit 9350b63 into thisandagain:master Feb 17, 2014

1 check passed

default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment