public string GetPostStringOrNull() { string contentType = RequestContentType; if (contentType == null) { return(null); } Debug.Assert(_requestInfo.HttpMethod == HttpMethods.Post); return(_requestInfo.GetPostString()); }
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"); }