Beispiel #1
0
        public string GetPostStringOrNull()
        {
            string contentType = RequestContentType;

            if (contentType == null)
            {
                return(null);
            }
            Debug.Assert(_requestInfo.HttpMethod == HttpMethods.Post);
            return(_requestInfo.GetPostString());
        }
Beispiel #2
0
        public string RequiredPostString()
        {
            Debug.Assert(_requestInfo.HttpMethod == HttpMethods.Post);
            var s = _requestInfo.GetPostString();

            if (!string.IsNullOrWhiteSpace(s))
            {
                return(s);
            }
            throw new ApplicationException("The query " + _requestInfo.RawUrl + " should have post string");
        }