private void InspectFourthRequest(HttpApplicationRequestSection obj, string pathBase) { Assert.Equal("DELETE", obj.RequestFeature.Method); Assert.Equal("/api/WebCustomers/2", obj.RequestFeature.Path); Assert.Equal(pathBase, obj.RequestFeature.PathBase); Assert.Equal("HTTP/1.1", obj.RequestFeature.Protocol); Assert.Equal("http", obj.RequestFeature.Scheme); Assert.Equal("localhost:12345", obj.RequestFeature.Headers[HeaderNames.Host]); }
private void InspectFirstRequest(HttpApplicationRequestSection obj, string pathBase, string scheme) { Assert.Equal("GET", obj.RequestFeature.Method); Assert.Equal("/api/WebCustomers", obj.RequestFeature.Path); Assert.Equal(pathBase, obj.RequestFeature.PathBase); Assert.Equal("HTTP/1.1", obj.RequestFeature.Protocol); Assert.Equal(scheme, obj.RequestFeature.Scheme); Assert.Equal("?Query=Parts", obj.RequestFeature.QueryString); Assert.Equal("localhost:12345", obj.RequestFeature.Headers[HeaderNames.Host]); }
private void InspectThirdRequest(HttpApplicationRequestSection obj, string pathBase, string scheme) { Assert.Equal("PUT", obj.RequestFeature.Method); Assert.Equal("/api/WebCustomers/1", obj.RequestFeature.Path); Assert.Equal(pathBase, obj.RequestFeature.PathBase); Assert.Equal("HTTP/1.1", obj.RequestFeature.Protocol); Assert.Equal(scheme, obj.RequestFeature.Scheme); Assert.Equal("localhost:12345", obj.RequestFeature.Headers[HeaderNames.Host]); var serializer = JsonSerializer.Create(); dynamic deserialized = serializer.Deserialize(new JsonTextReader(new StreamReader(obj.RequestFeature.Body))); Assert.Equal("1", deserialized.Id.ToString()); Assert.Equal("Peter", deserialized.Name.ToString()); }
private void InspectSecondRequest(HttpApplicationRequestSection obj, string pathBase) { Assert.Equal("POST", obj.RequestFeature.Method); Assert.Equal("/api/WebCustomers", obj.RequestFeature.Path); Assert.Equal(pathBase, obj.RequestFeature.PathBase); Assert.Equal("HTTP/1.1", obj.RequestFeature.Protocol); Assert.Equal("http", obj.RequestFeature.Scheme); Assert.Equal("localhost:12345", obj.RequestFeature.Headers[HeaderNames.Host]); var serializer = JsonSerializer.Create(); dynamic deserialized = serializer.Deserialize(new JsonTextReader(new StreamReader(obj.RequestFeature.Body))); Assert.Equal("129", deserialized.Id.ToString()); Assert.Equal("Name4752cbf0-e365-43c3-aa8d-1bbc8429dbf8", deserialized.Name.ToString()); }