Need help for http.client library for doing a PUT request, like to know if there is a way to add header info and payload in the PUT request, I see documentation says as below, is there a way to embed header and payload info in the BODY? If so, could you please show an example.
import http.client
BODY = "***filecontents***"
conn = http.client.HTTPConnection("localhost", 8080)
conn.request("PUT", "/file", BODY)
You can add header info as a dict on 4 arguments. As far as know is not possible embed in the BODY.