Beispiel #1
0
        public ApiResponse ExecuteRequestWithUpload(IApiRequest ApiRequest, string UploadFileName, string UploadFieldName, string UploadFileContentType, System.Collections.Specialized.NameValueCollection PostData)
        {
            XmlHttpRequest xmlHttpRequest = (XmlHttpRequest)ApiRequest;

            string xmlMessage = xmlHttpRequest.Serialize();

            SetLastRequestRaw(xmlMessage);
            PostData.Add("XMLMessage", xmlMessage);

            System.Net.HttpWebResponse response = HttpTools.HttpUploadFile(this.ApiUrl, UploadFileName, UploadFieldName, UploadFileContentType, PostData);

            string strResponseText = response.GetResponseText();

            SetLastResponseRaw(strResponseText);

            return(GetResponseFromXml(strResponseText));
        }