Http response

Sometimes it is necessary to get a full http response from a web service. In this case, you can use the standard NClient methods:

public interface IProductServiceClient : INClient
{
    [GetMethod]
    Task<Product> GetAsync(int id);
}

...

IProductServiceClient client = NClientProvider
    .Use<IProductServiceClient>(host: "http://localhost:8080")
    .Build();

HttpResponse<Product> response = await client.AsHttp()
    .GetHttpResponse(productClient => productClient.GetAsync(id: 1));