It is safe in this case. * gock.BodyString(body string) coerces body into a []byte * client.SetData() eventually resolves to a call to http.Client.Do(), which handles the string gracefully as well.