Closed
Description
I'm trying to call an API, that expects 'Content-Length' = 0 for a HTTP PATCH Request. There is no request body for this request.
It seems golang (from 1.8) does not allow to set Content-length with zero bytes. ( pls see -- golang/go#20257)
How do I set the header?
I have tried
restyClient.SetBody(http.NoBody).SetContentLength(true)
And
reqHeader := map[string]string {
"Content-Length": "0",
}
None of these 2 ways set the content-length header.