From 31a853ccd64ebd6465bc1c54e9dff0ce74e33d0c Mon Sep 17 00:00:00 2001 From: sfw Date: Tue, 7 Aug 2018 18:20:13 +0800 Subject: [PATCH] ch4-6-fix typo --- ch4-rpc/ch4-06-grpc-ext.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch4-rpc/ch4-06-grpc-ext.md b/ch4-rpc/ch4-06-grpc-ext.md index 663b820..d69359c 100644 --- a/ch4-rpc/ch4-06-grpc-ext.md +++ b/ch4-rpc/ch4-06-grpc-ext.md @@ -248,7 +248,7 @@ func main() { } ``` -首先通过runtime.NewServeMux()函数创建路由处理器,然后通过RegisterRestServiceHandlerFromEndpoint函数将RestService服务相关的REST接口中转到后面的GRPC服务。grpc-gateway提供的runtime.ServeMux类也实现了http.Handler接口,因此可以标准库中的相关函数配合使用。 +首先通过runtime.NewServeMux()函数创建路由处理器,然后通过RegisterRestServiceHandlerFromEndpoint函数将RestService服务相关的REST接口中转到后面的GRPC服务。grpc-gateway提供的runtime.ServeMux类也实现了http.Handler接口,因此可以和标准库中的相关函数配合使用。 档GRPC和REST服务全部启动之后,就可以用curl请求REST服务了: