frpc: support stop command (#3511)
This commit is contained in:
committed by
GitHub
Unverified
parent
4c4d5f0d0d
commit
fc4e787fe2
@@ -62,6 +62,15 @@ func (c *Client) Reload() error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Client) Stop() error {
|
||||
req, err := http.NewRequest("POST", "http://"+c.address+"/api/stop", nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = c.do(req)
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *Client) GetConfig() (string, error) {
|
||||
req, err := http.NewRequest("GET", "http://"+c.address+"/api/config", nil)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user