code: private function appendPayloadToRequest(MemoryStream $ms): MemoryStream
      {
          $this->payload->reset();
          
          while ($this->payload->ready()) {
              $ms->write($this->payload->read(1024));
          }
          
          $ms->reset();
          
          return $ms;
      }
docs: Append the payload buffer to the request buffer
  
  @param MemoryStream $ms
  @return MemoryStream
  @throws \Generics\Streams\StreamException
  @throws \Generics\ResetException