void WebContents::DidGetResourceResponseStart(
const content::ResourceRequestDetails& details) {
+ auto context = AtomBrowserContext::Get();
+ std::string headers;
+ if (context)
+ headers = context->GetNetworkDelegate()->GetResponseHeaders(details.url);
+
Emit("did-get-response-details",
details.socket_address.IsEmpty(),
details.url,
details.original_url,
details.http_response_code,
details.method,
- details.referrer);
+ details.referrer,
+ headers);
}
void WebContents::DidGetRedirectForResourceRequest(
'did-start-loading': []
'did-stop-loading': []
'did-get-response-details': ['status', 'newUrl', 'originalUrl',
- 'httpResponseCode', 'requestMethod', 'referrer']
+ 'httpResponseCode', 'requestMethod', 'referrer',
+ 'headers']
'did-get-redirect-request': ['oldUrl', 'newUrl', 'isMainFrame']
'dom-ready': []
'console-message': ['level', 'message', 'line', 'sourceId']
* `httpResponseCode` Integer
* `requestMethod` String
* `referrer` String
+* `headers` String
Emitted when details regarding a requested resource is available.
`status` indicates the socket connection to download the resource.
+`headers` is key-value string separated by new-line character.
### Event: 'did-get-redirect-request'
* `httpResponseCode` Integer
* `requestMethod` String
* `referrer` String
+* `headers` String
Fired when details regarding a requested resource is available.
`status` indicates socket connection to download the resource.
+`headers` is key-value string separated by new-line character.
### did-get-redirect-request