public async Task NoContentWithContentTypeHandledCleanly()
        {
            using (MockHttpServer.Raw((request, response) =>
            {
                response.StatusCode = 204;
                response.ContentType = "application/json";
            }))
            {
                var client = HttpApiClient <IPostReturnsNothing> .Create("http://localhost:8844/path");

                await client.Post("foo");
            }
        }
        public async Task NonSuccessThrowsException()
        {
            using (MockHttpServer.Raw((request, response) => response.StatusCode = 500))
            {
                var client = HttpApiClient <INonSuccess> .Create("http://localhost:8844");

                try
                {
                    await client.Call();

                    Assert.Fail("An exception should have been thrown");
                }
                catch (NonSuccessfulResponseException)
                {
                }
            }
        }