tutorials/

directory
v1.1.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2021 License: Apache-2.0

README

simple http api service

func main() {
    s := service.New(
        service.HttpAddress("0.0.0.0:9999"),
    )

    phello.RegisterHelloWorldServer(s.Server(), &hello.Hello{})
    err := s.Run()
    if err != nil {
        rlog.Error(err)
    }
}
curl -H "Content-Type:application/json" -X POST -d '{"ping": "ping"}' http://127.0.0.1:9999/roc/HelloWorld/Say

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL