
I have tried multiple ways to try to send the ETag so I can submit a PATCH to update a vendor and I get an error response every time. So, I atttempted to create a EntityTagHeaderValue object to send with the request and even it throws an exception:
var eTagHeader = new EntityTagHeaderValue(etag);
The exception thrown:
"The specified value is not a valid quoted string."
So, I figured it was the escaped double-quotes, so I attempted to replace them:
var eTagHeader = new EntityTagHeaderValue(etag.Replace(@"\""", ""));
That resulted in the same exception. How does one retrieve the eTag from Business Central and send that back in a PATCH request?
Someone else had a similar issue in the past: https://community.dynamics.com/nav/f/microsoft-dynamics-nav-forum/241021/etag-value-not-valid-on-put-request