Fixing `content-length` header value & request body format for xhr shim