Closed icepie closed 10 months ago
there is a special function to automatically set the content length, it will also set to 0 if needed:
r.SetContentLength(true)
there is a special function to automatically set the content length, it will also set to 0 if needed:
r.SetContentLength(true)
Code
req := c.HttpClient.R().SetDigestAuth(c.username, c.password).
SetHeader("Content-Type", "application/xml").
SetContentLength(true).
SetBody(reqBody)
resp, err := req.
Put("/ISAPI/AccessControl/RemoteControL/door/1")
Out
Put "http://192.168.0.51/ISAPI/AccessControl/RemoteControL/door/1": net/http: HTTP/1.x transport connection broken: http: ContentLength=54 with Body length 0
Same problem.
Merged #730
Code
Out
but
GET
method will be fine !