Skip to main content
Version: v1.36.1

HTTP endpoint

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

Example

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

Configuration fields

To configure your HTTP endpoint:

FieldDescription
URLLocation to retrieve the file
(ex: http://mydomain.io/flag.yaml).
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