Skip to content

Commit 627de0d

Browse files
authored
docs(hertz): fix doc about client Get and Post (#1419)
1 parent 9be323a commit 627de0d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

  • content
    • en/docs/hertz/tutorials/basic-feature
    • zh/docs/hertz/tutorials/basic-feature

content/en/docs/hertz/tutorials/basic-feature/client.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ func main() {
241241

242242
### Get
243243

244-
The `Get` function returns the status code of the URL and the response body. If dst is too small, it will be replaced by the response body and returned, otherwise a new slice will be assigned.
244+
The `Get` function returns the status code of the URL and the response body. The contents of dst will be replaced by the body and returned, if the dst is too small a new slice will be allocated.
245245

246246
The function will automatically follow the redirect.
247247

@@ -268,7 +268,7 @@ func main() {
268268

269269
### Post
270270

271-
The `Post` function sends a POST request to the specified URL using the given POST parameters. If dst is too small, it will be replaced by the response body and returned, otherwise a new slice will be assigned.
271+
The `Post` function sends a POST request to the specified URL using the given POST parameters. The contents of dst will be replaced by the body and returned, if the dst is too small a new slice will be allocated.
272272

273273
The function will automatically follow the redirect.
274274

content/zh/docs/hertz/tutorials/basic-feature/client.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func main() {
234234

235235
### Get
236236

237-
Get 函数返回 URL 的状态码和响应体。如果 dst 太小,则将被响应体替换并返回,否则将分配一个新的切片
237+
Get 函数返回 URL 的状态码和响应体。dst 将被响应体替换并返回,如果 dst 太小,将分配一个新的切片
238238

239239
该函数会自动跟随重定向。
240240

@@ -261,7 +261,7 @@ func main() {
261261

262262
### Post
263263

264-
Post 函数使用给定的 POST 参数向指定的 URL 发送 POST 请求。如果 dst 太小,则将被响应体替换并返回,否则将分配一个新的切片
264+
Post 函数使用给定的 POST 参数向指定的 URL 发送 POST 请求。dst 将被响应体替换并返回,如果 dst 太小,则将分配一个新的切片
265265

266266
该函数会自动跟随重定向。
267267

0 commit comments

Comments
 (0)