/**
  * @return array
  */
 function jsonSerialize()
 {
     $serializedJson = ["status" => $this->statusCode];
     if (!$this->header->isEmpty()) {
         $serializedJson["headers"] = $this->header;
     }
     if (!$this->body->isEmpty()) {
         $serializedJson["body"] = $this->body;
     }
     return $serializedJson;
 }
 /**
  * @return array
  */
 public function jsonSerialize()
 {
     $serializedJson = ["method" => $this->method, "path" => $this->path];
     if (!$this->query->isEmpty()) {
         $serializedJson["query"] = $this->query;
     }
     if (!$this->header->isEmpty()) {
         $serializedJson["headers"] = $this->header;
     }
     if (!$this->body->isEmpty()) {
         $serializedJson["body"] = $this->body;
     }
     return $serializedJson;
 }