used set content length api rather set header directly