public void Ctor_RelativeUriString() { var client = HttpClientTestHelpers.CreateHttpClient(); client.BaseAddress = new Uri("http://en.wikipedia.org/wiki/"); var req = new HttpRequestMessage(HttpMethod.Get, "Computer"); // HttpRequestMessage does not rewrite it here. Assert.IsFalse(req.RequestUri.IsAbsoluteUri); }
public void Ctor_RelativeUri() { var client = HttpClientTestHelpers.CreateHttpClient(); client.BaseAddress = new Uri("http://en.wikipedia.org/wiki/"); var uri = new Uri("Computer", UriKind.Relative); var req = new HttpRequestMessage(HttpMethod.Get, uri); // HttpRequestMessage does not rewrite it here. Assert.AreEqual(req.RequestUri, uri); }