fix #1; support custom request headers
(cherry picked from commit 64d3c38)
fix #6
(cherry picked from commit 4de1df8)
make framented passed
(cherry picked from commit 06b506e)