gitea/client/base.go

16 lines
271 B
Go
Raw Normal View History

package client
import (
"code.gitea.io/gitea/modules/setting"
"github.com/go-resty/resty/v2"
)
var client *resty.Client = nil
func Request() *resty.Request {
if client == nil {
client = resty.New().SetBaseURL(setting.DiscussionServer.Url)
}
return client.R()
}