No type change please. Use (size_t)-1 - it's special constant which means "unlimited amount of data" for the httpc client. Other negative values are not used.