controller/pkg/x3-client/client.go
2024-10-10 20:25:05 +03:00

27 lines
358 B
Go

package x3_client
import (
"net/http"
"net/http/cookiejar"
)
type X3Client struct {
basePath string
httpClient *http.Client
}
func NewX3Client(basePath string) (*X3Client, error) {
jar, err := cookiejar.New(nil)
if err != nil {
return nil, err
}
return &X3Client{
basePath: basePath,
httpClient: &http.Client{
Jar: jar,
},
}, nil
}