RestApi checks for payload before adding Content-Length header