implement setHeaders function
Merge pull request #1 from k-hamano/impl-setHeaders

implement setHeaders function