如何从 DotNetBrowser 中的请求访问有效负载数据
How to accessing payload data from request in DotNetBrowser
我需要发送请求的负载数据。如何访问 http 请求负载数据?
您可以使用 SendUploadDataHandler
来达到这个目的。
例如:
engine.Network.SendUploadDataHandler =
new Handler<SendUploadDataParameters, SendUploadDataResponse>(parameters =>
{
if ("POST" == parameters.UrlRequest.Method)
{
IUploadData uploadData = parameters.UploadData;
TextData textData = uploadData as TextData;
if (textData != null)
{
//This request contains text data.
}
}
return SendUploadDataResponse.Continue();
});
另请参阅:
- https://dotnetbrowser-support.teamdev.com/docs/guides/gs/network.html#before-send-upload-data
- https://github.com/TeamDev-IP/DotNetBrowser-Examples/blob/master/csharp/PostData/Program.cs
如有任何其他问题,请随时通过 customer-care@teamdev.com
与我们联系
我需要发送请求的负载数据。如何访问 http 请求负载数据?
您可以使用 SendUploadDataHandler
来达到这个目的。
例如:
engine.Network.SendUploadDataHandler =
new Handler<SendUploadDataParameters, SendUploadDataResponse>(parameters =>
{
if ("POST" == parameters.UrlRequest.Method)
{
IUploadData uploadData = parameters.UploadData;
TextData textData = uploadData as TextData;
if (textData != null)
{
//This request contains text data.
}
}
return SendUploadDataResponse.Continue();
});
另请参阅:
- https://dotnetbrowser-support.teamdev.com/docs/guides/gs/network.html#before-send-upload-data
- https://github.com/TeamDev-IP/DotNetBrowser-Examples/blob/master/csharp/PostData/Program.cs
如有任何其他问题,请随时通过 customer-care@teamdev.com
与我们联系