1515# specific language governing permissions and limitations
1616# under the License.
1717
18+ import uuid
1819from .session import session_subscribe
1920from .session import session_unsubscribe
2021
@@ -46,7 +47,7 @@ def __init__(self, conn):
4647
4748 def command_iterator (self , command ):
4849 """Generator to yield command."""
49- yield command
50+ yield command . to_json ()
5051
5152 def has_callbacks (self ):
5253 """Checks if there are any callbacks set."""
@@ -235,6 +236,10 @@ def continue_request(self):
235236 command = {'method' : 'network.continueRequest' , 'params' : params }
236237 self .network .conn .execute (self .command_iterator (command ))
237238
239+ def command_iterator (self , command ):
240+ """Generator to yield command."""
241+ yield command .to_json ()
242+
238243class Response :
239244 def __init__ (self , request_id , url , status_code , headers , body , network : Network ):
240245 self .request_id = request_id
@@ -256,3 +261,7 @@ def continue_response(self):
256261 params ['body' ] = self .body
257262 command = {'method' : 'network.continueResponse' , 'params' : params }
258263 self .network .conn .execute (self .command_iterator (command ))
264+
265+ def command_iterator (self , command ):
266+ """Generator to yield command."""
267+ yield command .to_json ()
0 commit comments