示例#1
0
        public static async void SendRequest(Payload payload)
        {
            Manager.Log("Request sent: " + payload.ToString(), LogMessageType.Request);
            var data      = "[" + payload + "]";
            var signature = Requests.BuildSignature(data);
            var script    = $"(async () => {AP._f("responseManager")}.setData(JSON.stringify(await {AP._f("sendRequest")}('{data}', '{signature}')), '{signature}') )();";

            payloads.Add(signature, payload);
            await Browser.EvaluateScriptAsync(script);
        }