C#, HTTPClient - IfMatch format requirements?
问题 I am using the System.Net.Http.HttpClient found in .Net 4.5 in conjunction with CouchDb. I have a revision of a document being: 3-789d4d2b33bf4505f8f23fd4a1025a4e . The issue is that I can't get that to work with the If-Match header flag on the request. var req = new HttpRequestMessage(HttpMethod.Delete, url); req.Headers.IfMatch.Add( new EntityTagHeaderValue("3-789d4d2b33bf4505f8f23fd4a1025a4e")); The EntityTagHeaderValue causes a format exception: "The format of value '3