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); } }
public static void AddHttpRequestExpectation(IWebRequestHelper webRequestHelper, HttpWebRequest httpRequest, string request, string response) { Expect.On(webRequestHelper).Call(webRequestHelper.GetResponse(httpRequest, request)).Return(response); }
public string MakeWebRequestCall(IWebRequestHelper webServiceHelper, HttpWebRequest webRequest, string request) { string returnString = webServiceHelper.GetResponse(webRequest, request); return(returnString); }