Question: What is the correct way to pass this as a body of an HTTP POST request?
- resp, err := http.Post("https://httpbin.org/post", "text/plain", []byte(data))
- resp, err := http.Post("https://httpbin.org/post", "text/plain", data)
- resp, err := http.Post("https://httpbin.org/post", "text/plain", strings.NewReader(data))
- resp, err := http.Post("https://httpbin.org/post", "text/plain", &data)
Answer: The correct answer of the above question is Option C:resp, err := http.Post("https://httpbin.org/post", "text/plain", strings.NewReader(data))