@@ -17,10 +17,14 @@ std::unique_ptr<Network::Request> createRequest(
1717}
1818
1919std::unique_ptr<Network::Response> createResponse (
20- const String& url, int status, std::unique_ptr<Network::Headers> headers) {
20+ const String& url,
21+ int status,
22+ const String& statusText,
23+ std::unique_ptr<Network::Headers> headers) {
2124 return Network::Response::create ()
2225 .setUrl (url)
2326 .setStatus (status)
27+ .setStatusText (statusText)
2428 .setHeaders (std::move (headers))
2529 .build ();
2630}
@@ -96,6 +100,8 @@ void NetworkAgent::responseReceived(
96100 response->getString (" url" , &url);
97101 int status;
98102 response->getInteger (" status" , &status);
103+ String statusText;
104+ response->getString (" statusText" , &statusText);
99105
100106 ErrorSupport errors;
101107 auto headers =
@@ -104,10 +110,11 @@ void NetworkAgent::responseReceived(
104110 headers = std::make_unique<Network::Headers>(DictionaryValue::create ());
105111 }
106112
107- frontend_->responseReceived (request_id,
108- timestamp,
109- type,
110- createResponse (url, status, std::move (headers)));
113+ frontend_->responseReceived (
114+ request_id,
115+ timestamp,
116+ type,
117+ createResponse (url, status, statusText, std::move (headers)));
111118}
112119
113120void NetworkAgent::loadingFinished (
0 commit comments