Пример #1
0
        void SetupMultiPartBody()
        {
            var multiPartStreamer = new MultiPartStreamer(MultiPartFormData, MultiPartFileData);

            httpWebRequest.ContentType = multiPartStreamer.GetContentType();
            var contentLength = multiPartStreamer.GetContentLength();

            if (contentLength > 0)
            {
                httpWebRequest.ContentLength = contentLength;
            }

            multiPartStreamer.StreamMultiPart(httpWebRequest.GetRequestStream());
        }
Пример #2
0
        void SetupMultiPartBody()
        {
            var multiPartStreamer = new MultiPartStreamer(MultiPartFormData, MultiPartFileData);

            httpWebRequest.ContentType = multiPartStreamer.GetContentType();
            var contentLength = multiPartStreamer.GetContentLength();

            if (contentLength > 0)
            {
                httpWebRequest.ContentLength = contentLength;
            }

            multiPartStreamer.StreamMultiPart(httpWebRequest.GetRequestStream());
        }