From 2b1eb5e04a0b1d5ebdceb69ff431643e17cee95f Mon Sep 17 00:00:00 2001 From: imroc Date: Wed, 15 Nov 2017 15:17:38 +0800 Subject: [PATCH] fix README --- README.md | 4 ++-- doc/README_cn.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3bdd94cd..bdc77fc9 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ req.Get("https://www.baidu.com", header) ``` ## Set Param -Use `req.Param` (it is actually a `map[string]string`) +Use `req.Param` (it is actually a `map[string]interface{}`) ``` go param := req.Param{ "id": "imroc", @@ -114,7 +114,7 @@ param := req.Param{ req.Get("http://foo.bar/api", param) // http://foo.bar/api?id=imroc&pwd=roc req.Post(url, param) // body => id=imroc&pwd=roc ``` -use `req.QueryParam` force to append params to the url (it is also actually a `map[string]string`) +use `req.QueryParam` force to append params to the url (it is also actually a `map[string]interface{}`) ``` go req.Post("http://foo.bar/api", req.Param{"name": "roc", "age": "22"}, req.QueryParam{"access_token": "fedledGF9Hg9ehTU"}) /* diff --git a/doc/README_cn.md b/doc/README_cn.md index 866cfaee..4928d074 100644 --- a/doc/README_cn.md +++ b/doc/README_cn.md @@ -98,7 +98,7 @@ req.Get("https://www.baidu.com", header) ``` ## 设置请求参数 -Use `req.Param` (它实际上是一个 `map[string]string`) +Use `req.Param` (它实际上是一个 `map[string]interface{}`) ``` go param := req.Param{ "id": "imroc", @@ -107,7 +107,7 @@ param := req.Param{ req.Get("http://foo.bar/api", param) // http://foo.bar/api?id=imroc&pwd=roc req.Post(url, param) // 请求体 => id=imroc&pwd=roc ``` -使用 `req.QueryParam` 强制将请求参数拼在url后面 (它实际上也是一个 `map[string]string`) +使用 `req.QueryParam` 强制将请求参数拼在url后面 (它实际上也是一个 `map[string]interface{}`) ``` go req.Post("http://foo.bar/api", req.Param{"name": "roc", "age": "22"}, req.QueryParam{"access_token": "fedledGF9Hg9ehTU"}) /*