예제 #1
0
 def __init__(
     self,
     requestId: Union['RequestId', dict],
     request: Union['Network.Request', dict],
     frameId: Union['Page.FrameId', dict],
     resourceType: Union['Network.ResourceType', dict],
     responseErrorReason: Union['Network.ErrorReason', dict, None] = None,
     responseStatusCode: Union['int', dict, None] = None,
     responseHeaders: Union['[HeaderEntry]', dict, None] = None,
     networkId: Union['RequestId', dict, None] = None,
 ):
     if isinstance(requestId, dict):
         requestId = RequestId(**requestId)
     self.requestId = requestId
     if isinstance(request, dict):
         request = Network.Request(**request)
     self.request = request
     if isinstance(frameId, dict):
         frameId = Page.FrameId(**frameId)
     self.frameId = frameId
     if isinstance(resourceType, dict):
         resourceType = Network.ResourceType(**resourceType)
     self.resourceType = resourceType
     if isinstance(responseErrorReason, dict):
         responseErrorReason = Network.ErrorReason(**responseErrorReason)
     self.responseErrorReason = responseErrorReason
     if isinstance(responseStatusCode, dict):
         responseStatusCode = int(**responseStatusCode)
     self.responseStatusCode = responseStatusCode
     if isinstance(responseHeaders, dict):
         responseHeaders = [HeaderEntry](**responseHeaders)
     self.responseHeaders = responseHeaders
     if isinstance(networkId, dict):
         networkId = RequestId(**networkId)
     self.networkId = networkId
예제 #2
0
 def __init__(
     self,
     requestId: Union['RequestId', dict],
     request: Union['Network.Request', dict],
     frameId: Union['Page.FrameId', dict],
     resourceType: Union['Network.ResourceType', dict],
     authChallenge: Union['AuthChallenge', dict],
 ):
     if isinstance(requestId, dict):
         requestId = RequestId(**requestId)
     self.requestId = requestId
     if isinstance(request, dict):
         request = Network.Request(**request)
     self.request = request
     if isinstance(frameId, dict):
         frameId = Page.FrameId(**frameId)
     self.frameId = frameId
     if isinstance(resourceType, dict):
         resourceType = Network.ResourceType(**resourceType)
     self.resourceType = resourceType
     if isinstance(authChallenge, dict):
         authChallenge = AuthChallenge(**authChallenge)
     self.authChallenge = authChallenge