mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-19 15:01:22 +02:00
run as non root and non host network mode
This commit is contained in:
@@ -2,19 +2,17 @@ package query
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
v1 "github.com/yusing/go-proxy/internal/api/v1"
|
||||
U "github.com/yusing/go-proxy/internal/api/v1/utils"
|
||||
"github.com/yusing/go-proxy/internal/common"
|
||||
E "github.com/yusing/go-proxy/internal/error"
|
||||
"github.com/yusing/go-proxy/internal/net/http/middleware"
|
||||
)
|
||||
|
||||
func ReloadServer() E.Error {
|
||||
resp, err := U.Post(common.APIHTTPURL+"/v1/reload", "", nil)
|
||||
resp, err := U.FetchAPI(http.MethodPost, "/v1/reload", nil)
|
||||
if err != nil {
|
||||
return E.From(err)
|
||||
}
|
||||
@@ -32,7 +30,7 @@ func ReloadServer() E.Error {
|
||||
}
|
||||
|
||||
func List[T any](what string) (_ T, outErr E.Error) {
|
||||
resp, err := U.Get(fmt.Sprintf("%s/v1/list/%s", common.APIHTTPURL, what))
|
||||
resp, err := U.FetchAPI(http.MethodGet, "/v1/list/"+what, nil)
|
||||
if err != nil {
|
||||
outErr = E.From(err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user