fix(core): user script not able to send cookie header

fix #358
This commit is contained in:
genteure 2022-09-11 17:28:56 +08:00
parent 9bf0a400ba
commit 1440f2c2d9

View File

@ -31,7 +31,13 @@ namespace BililiveRecorder.Core.Scripting.Runtime
? throw new JavaScriptException(this._engine.Realm.Intrinsics.Error, "The provided value is not of type 'RequestInit'.") ? throw new JavaScriptException(this._engine.Realm.Intrinsics.Error, "The provided value is not of type 'RequestInit'.")
: arg1; : arg1;
var handler = new HttpClientHandler(); var handler = new HttpClientHandler
{
UseCookies = false,
UseDefaultCredentials = false,
UseProxy = false,
};
var httpClient = new HttpClient(handler); var httpClient = new HttpClient(handler);
var requestMessage = new HttpRequestMessage(HttpMethod.Get, urlString.ToString()); var requestMessage = new HttpRequestMessage(HttpMethod.Get, urlString.ToString());
var throwOnRedirect = false; var throwOnRedirect = false;