Open kostas-petrakis opened 3 months ago
There is a small mistake in the Get Response body in the documentation.
More specific the example for the ToBytes() is:
ToBytes()
body, err := resp.ToString() if err != nil { log.Fatal(err) } fmt.Println("body:", body)
I think should be:
resp, err := client.R().Get(url) if err != nil { log.Fatal(err) } body, err := resp.ToBytes() if err != nil { log.Fatal(err) } fmt.Println("body:", string(body))
The example shows ToString() or ToBytes(), which uses ToString() for example, and ToBytes() is been omitted
ToString()
There is a small mistake in the Get Response body in the documentation.
More specific the example for the
ToBytes()
is:I think should be: