replaycli-go/api/frontend/lib.go

30 lines
524 B
Go
Raw Permalink Normal View History

2021-11-13 19:30:02 +00:00
package frontend
import "go.digitalcircle.com.br/open/replaycli-go/api"
type Cli struct {
}
type HttpRes struct {
Headers map[string]string
Body []byte
}
type HttpReq struct {
Url string
Headers map[string]string
Body []byte
}
func (c *Cli) Get(req *HttpReq, copts ...*api.CallOpts) (*HttpRes, error) {
res := &HttpRes{}
//err := c.HttpCli().JsonPost("/ipc/ocr/", opts, res)
2021-11-13 21:35:07 +00:00
err := api.Call("frontend.handle", req, &res, copts...)
2021-11-13 19:30:02 +00:00
return res, err
}
func NewCli() *Cli {
ret := &Cli{}
return ret
}