Default to RFC3986 encoding for getParamString in HttpRequest.
This commit is contained in:
parent
fbe4fe18de
commit
30064e6891
2 changed files with 4 additions and 4 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
0.2301.70411
|
||||
0.2301.71902
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
// HttpRequest.php
|
||||
// Created: 2022-02-08
|
||||
// Updated: 2023-01-01
|
||||
// Updated: 2023-01-07
|
||||
|
||||
namespace Index\Http;
|
||||
|
||||
|
@ -44,8 +44,8 @@ class HttpRequest extends HttpMessage {
|
|||
return $this->path;
|
||||
}
|
||||
|
||||
public function getParamString(): string {
|
||||
return http_build_query($this->params);
|
||||
public function getParamString(bool $spacesAsPlus = false): string {
|
||||
return http_build_query($this->params, '', '&', $spacesAsPlus ? PHP_QUERY_RFC1738 : PHP_QUERY_RFC3986);
|
||||
}
|
||||
|
||||
public function getParams(): array {
|
||||
|
|
Loading…
Reference in a new issue