public void CanMakeGetRequest() { try { var request = new HttpRequest(); var response = request.RequestRaw(HttpMethodType.Get, HttpExampleTestServer); Assert.IsNotNull(response); Assert.IsTrue(!String.IsNullOrEmpty(response.Result)); } catch (Exception exception) { Assert.Fail("Instantiation threw an exception: " + exception.Message); } }
public void CanMakePostRequest() { try { const string postDummyBody = "test=test&test2=test"; var request = new HttpRequest(); var response = request.RequestRaw<string>(HttpMethodType.Post, HttpExampleTestServer + "post", null, postDummyBody); Assert.IsTrue(!String.IsNullOrEmpty(response.Result)); } catch (Exception exception) { Assert.Fail("Instantiation threw an exception: " + exception.Message); } }