1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-29 08:12:21 +00:00

ch4-01-fix typo

This commit is contained in:
sfw 2018-07-03 17:00:26 +08:00
parent 0b39251dec
commit ba95019a77

View File

@ -315,7 +315,7 @@ func main() {
RPC的服务假设在“/jsonrpc”路径在处理函数中基于http.ResponseWriter和http.Request类型的参数构造一个io.ReadWriteCloser类型的conn通道。然后基于conn构建针对服务端的json编码解码器。最后通过rpc.ServeRequest处理一次RPC方法调用。
模拟一次RPC调用的过程就是向该链接发一个json字符串
模拟一次RPC调用的过程就是向该链接发一个json字符串
```
$ curl localhost:1234/jsonrpc -X POST --data '{"method":"HelloService.Hello","params":["hello"],"id":0}'