body, err := ioutil.ReadAll(res.Body)<br>
fmt.Println("post send success")<br>
fmt.Printf("type is %T\n", body)<br>
fmt.Printf("body is %#v\n", body)<br>
结果:<br>
post send success<br>
type is []uint8<br>
<?xml version="1.0" encoding="utf-8" ?><returnsms><br>
<errorstatus><br>
<error>2</error><br>
<remark>sign 参数错误</remark><br>
</errorstatus><br>
</returnsms><br>
body is []byte{0x3c, 0x3f, 0x78, 0x6d, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x2e, 0x30, 0x22, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x22, 0x20, 0x3f, 0x
3e, 0x3c, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x6d, 0x73, 0x3e, 0xa, 0x20, 0x3c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3e, 0xa, 0x20, 0x3c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x3e, 0x32, 0x3c, 0x2f, 0x65, 0x72, 0x7
2, 0x6f, 0x72, 0x3e, 0xa, 0x20, 0x3c, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x3e, 0x73, 0x69, 0x67, 0x6e, 0xe5, 0x8f, 0x82, 0xe6, 0x95, 0xb0, 0xe9, 0x94, 0x99, 0xe8, 0xaf, 0xaf, 0x3c, 0x2f, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x3e, 0xa, 0x20, 0x3c
, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3e, 0xa, 0x20, 0x3c, 0x2f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x6d, 0x73, 0x3e, 0xa, 0x20}
<?xml version="1.0" encoding="utf-8" ?><returnsms><br>
<errorstatus><br>
<error>2</error><br>
<remark>sign 参数错误</remark><br>
</errorstatus><br>
</returnsms><br>
是 string() 后的打印结果<br>![1668064734244.png](https://static.golangjob.cn/221110/44418a2a3c14fd5c21f49189f25989bb.png)
#1