Hey, by disconnected you mean that user aborted the connection unexpectedly or closed it after success?
If it is the success, then you just use RequestStream.CompleteAsync() and that will return just statucode 200 and request will be finished without exceptions.
IOException catch block is to catch when connection was unexpectedly aborted (CTRL+C) in my example, which means no metadata was sent before connection stopped, so server doesn’t know what happened which is exceptional situation.