eliminate http client, read and write directly