@@ -123,7 +123,10 @@ public function deleteArchive($archiveId)
123123 $ request = $ this ->delete ('/v2/project/ ' .$ this ->apiKey .'/archive/ ' .$ archiveId );
124124 $ request ->setHeader ('Content-Type ' , 'application/json ' );
125125 try {
126- $ request ->send ()->json ();
126+ $ response = $ request ->send ();
127+ if ($ response ->getStatusCode () != 204 ) {
128+ $ response ->json ();
129+ }
127130 } catch (\Exception $ e ) {
128131 $ this ->handleException ($ e );
129132 return false ;
@@ -136,7 +139,10 @@ public function forceDisconnect($sessionId,$connectionId)
136139 $ request = $ this ->delete ('/v2/project/ ' .$ this ->apiKey .'/session/ ' .$ sessionId .'/connection/ ' .$ connectionId );
137140 $ request ->setHeader ('Content-Type ' , 'application/json ' );
138141 try {
139- $ request ->send ()->json ();
142+ $ response = $ request ->send ();
143+ if ($ response ->getStatusCode () != 204 ) {
144+ $ response ->json ();
145+ }
140146 } catch (\Exception $ e ) {
141147 $ this ->handleException ($ e );
142148 return false ;
@@ -229,7 +235,10 @@ public function updateStream($sessionId, $streamId, $properties)
229235 $ request ->setBody (json_encode ($ properties ));
230236 $ request ->setHeader ('Content-Type ' , 'application/json ' );
231237 try {
232- $ request ->send ()->json ();
238+ $ response = $ request ->send ();
239+ if ($ response ->getStatusCode () != 204 ) {
240+ $ response ->json ();
241+ }
233242 } catch (\Exception $ e ) {
234243 $ this ->handleException ($ e );
235244 }
0 commit comments