コード例 #1
0
        public bool MakeExistenceRequest(string word)
        {
            var url = $"{ExistenceRequestUrlBase}/{word}";

            try
            {
                var request = _webRequestHelper.Create(url);
                _webRequestHelper.GetResponse(request);
                return(true);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(false);
            }
        }
コード例 #2
0
 public static void AddHttpRequestExpectation(IWebRequestHelper webRequestHelper, HttpWebRequest httpRequest, string request, string response)
 {
     Expect.On(webRequestHelper).Call(webRequestHelper.GetResponse(httpRequest, request)).Return(response);
 }
コード例 #3
0
        public string MakeWebRequestCall(IWebRequestHelper webServiceHelper, HttpWebRequest webRequest, string request)
        {
            string returnString = webServiceHelper.GetResponse(webRequest, request);

            return(returnString);
        }