Add proper handling for Stash's unfortunate content-encoding.
Refactor webhooks to have less code duplication.