We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5f0af7 commit 20b4808Copy full SHA for 20b4808
1 file changed
option/requestoption.go
@@ -9,6 +9,7 @@ import (
9
"log"
10
"net/http"
11
"net/url"
12
+ "strings"
13
"time"
14
15
"github.com/gitpod-io/gitpod-sdk-go/internal/requestconfig"
@@ -29,6 +30,9 @@ func WithBaseURL(base string) RequestOption {
29
30
log.Fatalf("failed to parse BaseURL: %s\n", err)
31
}
32
return func(r *requestconfig.RequestConfig) error {
33
+ if u.Path != "" && !strings.HasSuffix(u.Path, "/") {
34
+ u.Path += "/"
35
+ }
36
r.BaseURL = u
37
return nil
38
0 commit comments