continueResponse method

Future<void> continueResponse(
  1. RequestId requestId, {
  2. int? responseCode,
  3. String? responsePhrase,
  4. List<HeaderEntry>? responseHeaders,
  5. String? binaryResponseHeaders,
})

Continues loading of the paused response, optionally modifying the response headers. If either responseCode or headers are modified, all of them must be present. requestId An id the client received in requestPaused event. responseCode An HTTP response code. If absent, original response code will be used. responsePhrase A textual representation of responseCode. If absent, a standard phrase matching responseCode is used. responseHeaders Response headers. If absent, original response headers will be used. binaryResponseHeaders Alternative way of specifying response headers as a \0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text.

Implementation

Future<void> continueResponse(RequestId requestId,
    {int? responseCode,
    String? responsePhrase,
    List<HeaderEntry>? responseHeaders,
    String? binaryResponseHeaders}) async {
  await _client.send('Fetch.continueResponse', {
    'requestId': requestId,
    if (responseCode != null) 'responseCode': responseCode,
    if (responsePhrase != null) 'responsePhrase': responsePhrase,
    if (responseHeaders != null) 'responseHeaders': [...responseHeaders],
    if (binaryResponseHeaders != null)
      'binaryResponseHeaders': binaryResponseHeaders,
  });
}