sync code with http_to_nsq

it will be remove, once nsq provide nsq.Writer