@@ -63,7 +63,7 @@ public function get($uri, $data = [], $headers = [])
6363 'query ' => $ data ,
6464 ]);
6565
66- return $ this ->packer ->unpack ($ response ->getBody ()-> getContents ());
66+ return $ this ->packer ->unpack (( string ) $ response ->getBody ());
6767 }
6868
6969 public function post ($ uri , $ data = [], $ headers = [])
@@ -73,7 +73,7 @@ public function post($uri, $data = [], $headers = [])
7373 'form_params ' => $ data ,
7474 ]);
7575
76- return $ this ->packer ->unpack ($ response ->getBody ()-> getContents ());
76+ return $ this ->packer ->unpack (( string ) $ response ->getBody ());
7777 }
7878
7979 public function put ($ uri , $ data = [], $ headers = [])
@@ -83,7 +83,7 @@ public function put($uri, $data = [], $headers = [])
8383 'form_params ' => $ data ,
8484 ]);
8585
86- return $ this ->packer ->unpack ($ response ->getBody ()-> getContents ());
86+ return $ this ->packer ->unpack (( string ) $ response ->getBody ());
8787 }
8888
8989 public function delete ($ uri , $ data = [], $ headers = [])
@@ -93,7 +93,7 @@ public function delete($uri, $data = [], $headers = [])
9393 'query ' => $ data ,
9494 ]);
9595
96- return $ this ->packer ->unpack ($ response ->getBody ()-> getContents ());
96+ return $ this ->packer ->unpack (( string ) $ response ->getBody ());
9797 }
9898
9999 public function json ($ uri , $ data = [], $ headers = [])
@@ -103,7 +103,7 @@ public function json($uri, $data = [], $headers = [])
103103 'headers ' => $ headers ,
104104 'json ' => $ data ,
105105 ]);
106- return $ this ->packer ->unpack ($ response ->getBody ()-> getContents ());
106+ return $ this ->packer ->unpack (( string ) $ response ->getBody ());
107107 }
108108
109109 public function file ($ uri , $ data = [], $ headers = [])
@@ -129,7 +129,7 @@ public function file($uri, $data = [], $headers = [])
129129 'multipart ' => $ multipart ,
130130 ]);
131131
132- return $ this ->packer ->unpack ($ response ->getBody ()-> getContents ());
132+ return $ this ->packer ->unpack (( string ) $ response ->getBody ());
133133 }
134134
135135 public function request (string $ method , string $ path , array $ options = [])
0 commit comments