tutorials/

directory
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 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