private static string GetPostData(CefRequest request) { if ((request == null) || (request.PostData == null)) { return(string.Empty); } CefPostDataElement[] postDataElements = request.PostData.GetElements(); if ((postDataElements == null) || (postDataElements.Length == 0)) { return(string.Empty); } CefPostDataElement dataElement = postDataElements[0]; switch (dataElement.ElementType) { case CefPostDataElementType.Empty: break; case CefPostDataElementType.File: break; case CefPostDataElementType.Bytes: return(Encoding.UTF8.GetString(dataElement.GetBytes())); } return(string.Empty); }
public void Append(CefPostDataElement element) { var numBytes = (int)element.BytesCount; if (numBytes > 0) { var bytes = element.GetBytes(); Raw += Encoding.Default.GetString(bytes); } }
public PostHelper(CefPostDataElement element) : this() { var numBytes = (int)element.BytesCount; if (numBytes > 0) { var bytes = element.GetBytes(); Raw = Encoding.Default.GetString(bytes); } }