From b1edf5d8c3e47099751e77480899830f0b63832f Mon Sep 17 00:00:00 2001 From: Pete Snyder Date: Mon, 7 Jan 2019 11:29:08 -0500 Subject: [PATCH] Resolved Content-Length issue when posting to API endpoint with empty request body --- src/AvaTaxClient.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/AvaTaxClient.cs b/src/AvaTaxClient.cs index 7abd8c55..de7f8381 100644 --- a/src/AvaTaxClient.cs +++ b/src/AvaTaxClient.cs @@ -567,6 +567,7 @@ private string RestCallString(string verb, AvaTaxPath relativePath, object conte // Convert the name-value pairs into a byte array wr.Method = verb; + wr.ContentLength = 0; if (content != null) { wr.ContentType = Constants.JSON_MIME_TYPE; wr.ServicePoint.Expect100Continue = false;