Index: src/WebRequestJsObject.cpp |
=================================================================== |
--- a/src/WebRequestJsObject.cpp |
+++ b/src/WebRequestJsObject.cpp |
@@ -74,18 +74,21 @@ |
for (const auto& header : response.responseHeaders) |
{ |
headersObject.SetProperty(header.first, header.second); |
} |
resultObject.SetProperty("responseHeaders", headersObject); |
webRequestParams[2].Call(resultObject); |
}; |
- |
- jsEngine->GetPlatform().GetWebRequest().GET(url, headers, getCallback); |
+ jsEngine->GetPlatform().WithWebRequest( |
+ [url, headers, getCallback](IWebRequest& webRequest) |
+ { |
+ webRequest.GET(url, headers, getCallback); |
+ }); |
} |
namespace |
{ |
void GETCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments) |
{ |
try |
{ |