Skip to main content
Version: v0.18.6

HTTP endpoint

The HTTPRetriever will perform an HTTP Request with your configuration to get your flags.

Example

err := ffclient.Init(ffclient.Config{
PollingInterval: 3 * time.Second,
Retriever: &ffclient.HTTPRetriever{
URL: "http://example.com/flag-config.yaml",
Timeout: 2 * time.Second,
},
})
defer ffclient.Close()

Configuration fields

To configure your HTTP endpoint:

FieldDescription
URLlocation of your file.
Methodthe HTTP method you want to use
(default is GET).
Body(optional)
If you need a body to get the flags.
Header(optional)
Header you should pass while calling the endpoint (useful for authorization).
Timeout(optional)
Timeout for the HTTP call
(default is 10 seconds).

Get the latest GO Feature Flag updates