command
Version:
v0.0.0-...-908d554
Opens a new window with list of versions in this module.
Published: Nov 2, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
API
我们在这里演示通过micro api
调用有wrapper包装的接口
我们演示两个包装器:
- logWrapper
- rspHeaderWrapper
使用方式
运行API网关,我们传入api指令运行:
micro api --handler=api
再运行本api服务
go run api.go
调用服务
通过URL /example/call,就会调用go.micro.api.example服务的Example.Call接口
请求头的数据会被传到最终调用的接口
curl -H 'head-1: I am a header' "http://localhost:8080/example/call?name=john"
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.