Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
HttpClientOptions | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\Core\Http\Client; |
6 | |
7 | use PeServer\Core\Http\Client\HttpClientProxyOptions; |
8 | use PeServer\Core\Http\Client\HttpClientSecurityOptions; |
9 | use PeServer\Core\Http\Client\HttpRedirectOptions; |
10 | use PeServer\Core\Text; |
11 | use PeServer\Core\Web\UrlEncoding; |
12 | |
13 | /** |
14 | * HttpClient 設定データ。 |
15 | */ |
16 | |
17 | readonly class HttpClientOptions |
18 | { |
19 | #region variable |
20 | |
21 | public UrlEncoding $urlEncoding; |
22 | |
23 | #endregion |
24 | |
25 | public function __construct( |
26 | public string $userAgent = Text::EMPTY, |
27 | public HttpRedirectOptions $redirect = new HttpRedirectOptions(), |
28 | public HttpClientSecurityOptions $security = new HttpClientSecurityOptions(), |
29 | public ?HttpClientProxyOptions $proxy = null, |
30 | ?UrlEncoding $urlEncoding = null |
31 | ) { |
32 | $this->urlEncoding = $urlEncoding ?? UrlEncoding::createDefault(); |
33 | } |
34 | } |