I would like to use Hammock inside the .NET SDK, and I find a ‘HammockHttpClient.cs’ in the ‘Couchbase.HttpClient’ project. How should I use this HammockHttpClient.cs file in my project?
I tried to add ‘’ to App.config. However I got the following error:
‘The value of the property ‘type’ cannot be parsed. The error is: The type ‘Couchbase.HammockHttpClientFactory, Couchbase’ cannot be resolved…’
The Hammock client is no longer supported largely because the Hammock project itself is no longer maintained. That being said, the Hammock and RestSharp Http clients were moved to a separate assembly in the solution and can still be used.
To do so:
Clone or fork the source from Github: https://github.com/couchbase/couchbase-net-client
Create a new project and reference Couchbase, Couchbase.HttpClients and Enyim.Caching
Setup your config file like this:
<?xml version="1.0" encoding="utf-8" ?>
I just tried the steps above and it worked as expected, however, I would advise you to use the DefaultHttpCLient which comes with the Couchbase project in any production deployment.