implement beforeSend
Merge pull request #30 from Raynos/before-send

implement beforeSend