private function appendPayloadToRequest(MemoryStream $ms): MemoryStream
    {
        $this->payload->reset();
        
        while ($this->payload->ready()) {
            $ms->write($this->payload->read(1024));
        }
        
        $ms->reset();
        
        return $ms;
    }