Use write instead of send to post data