@@ -18,10 +18,10 @@ class Client
18
18
* @return PromiseInterface
19
19
*/
20
20
public function execute (
21
- string $ requestMethod ,
22
- string $ url ,
23
- array $ headers = [],
24
- $ body = ''
21
+ string $ requestMethod ,
22
+ string $ url ,
23
+ array $ headers = [],
24
+ ReadableStreamInterface | string $ body = ''
25
25
): PromiseInterface
26
26
{
27
27
return $ this ->prepareQueryable (
@@ -70,7 +70,7 @@ public static function get(string $url, array $headers = []): PromiseInterface
70
70
* @param ReadableStreamInterface|string $body
71
71
* @return PromiseInterface
72
72
*/
73
- public static function post (string $ url , array $ headers = [], $ body = '' ): PromiseInterface
73
+ public static function post (string $ url , array $ headers = [], ReadableStreamInterface | string $ body = '' ): PromiseInterface
74
74
{
75
75
return (new static ())->execute ('POST ' , $ url , $ headers , $ body );
76
76
}
@@ -95,7 +95,7 @@ public static function head(string $url, array $headers = []): PromiseInterface
95
95
* @param ReadableStreamInterface|string $body
96
96
* @return PromiseInterface
97
97
*/
98
- public static function patch (string $ url , array $ headers = [], $ body = '' ): PromiseInterface
98
+ public static function patch (string $ url , array $ headers = [], ReadableStreamInterface | string $ body = '' ): PromiseInterface
99
99
{
100
100
return (new static ())->execute ('PATCH ' , $ url , $ headers , $ body );
101
101
}
@@ -108,7 +108,7 @@ public static function patch(string $url, array $headers = [], $body = ''): Prom
108
108
* @param ReadableStreamInterface|string $body
109
109
* @return PromiseInterface
110
110
*/
111
- public static function put (string $ url , array $ headers = [], $ body = '' ): PromiseInterface
111
+ public static function put (string $ url , array $ headers = [], ReadableStreamInterface | string $ body = '' ): PromiseInterface
112
112
{
113
113
return (new static ())->execute ('PUT ' , $ url , $ headers , $ body );
114
114
}
0 commit comments