mirror of
https://gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud
synced 2024-11-25 02:56:24 +00:00
fix invalid instance url
This commit is contained in:
parent
2f652e2193
commit
d338b0c67a
@ -56,10 +56,14 @@ type Client struct {
|
||||
}
|
||||
|
||||
func NewClient(hostname string) (*Client, error) {
|
||||
baseURL, err := url.Parse(hostname)
|
||||
baseURL, err := url.ParseRequestURI(hostname)
|
||||
if err != nil {
|
||||
baseURL, err = url.ParseRequestURI("https://" + hostname)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
c := Client{
|
||||
baseURL: baseURL,
|
||||
headers: map[string]string{
|
||||
|
Loading…
Reference in New Issue
Block a user