Esempio n. 1
0
        private void AddOptionalHeaders(IRequestContext requestContext)
        {
            WebServiceRequest            originalRequest = requestContext.Request.OriginalRequest;
            IDictionary <string, string> headers         = requestContext.Request.Headers;

            if (originalRequest.IsSetContentType())
            {
                headers[Constants.ContentTypeHeader] = originalRequest.ContentType;
            }
            else
            {
                headers[Constants.ContentTypeHeader] = Constants.ContentTypeTextXml;
            }
            if (originalRequest.IsSetContentMD5())
            {
                headers[Constants.ContentMD5Header] = originalRequest.ContentMD5;
            }
        }