File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -149,15 +149,14 @@ func (c *Client) FlagsV2() (string, error) {
149
149
150
150
func (c * Client ) doFlagsV2 () (map [string ]* evaluation.Flag , error ) {
151
151
client := & http.Client {}
152
- endpoint , err := url .Parse (c .config .ServerUrl )
153
- if err != nil {
154
- return nil , err
152
+ endpoint := c .config .ServerUrl
153
+ Path := "/sdk/v2/flags"
154
+ if endpoint != "" && endpoint [len (endpoint )- 1 ] == '/' {
155
+ Path = "sdk/v2/flags"
155
156
}
156
- endpoint .Path = "sdk/v2/flags"
157
- endpoint .RawQuery = "v=0"
158
157
ctx , cancel := context .WithTimeout (context .Background (), c .config .FlagConfigPollerRequestTimeout )
159
158
defer cancel ()
160
- req , err := http .NewRequest ("GET" , endpoint . String () , nil )
159
+ req , err := http .NewRequest ("GET" , endpoint + Path , nil )
161
160
if err != nil {
162
161
return nil , err
163
162
}
You can’t perform that action at this time.
0 commit comments