diff --git a/VERSION b/VERSION index 9a243f0..f64a12c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2308.162302 +0.2308.212025 diff --git a/src/Http/Content/FormContent.php b/src/Http/Content/FormContent.php index 3305180..a83f23a 100644 --- a/src/Http/Content/FormContent.php +++ b/src/Http/Content/FormContent.php @@ -1,7 +1,7 @@ postFields; } + public function getParamString(bool $spacesAsPlus = false): string { + return http_build_query($this->postFields, '', '&', $spacesAsPlus ? PHP_QUERY_RFC1738 : PHP_QUERY_RFC3986); + } + public function getUploadedFile(string $name): HttpUploadedFile { if(!isset($this->uploadedFiles[$name])) throw new RuntimeException('No file with name $name present.'); @@ -49,6 +53,6 @@ class FormContent implements IHttpContent { } public function __toString(): string { - return ''; + return $this->getParamString(); } }