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:
Field | Description |
---|---|
URL | Location to retrieve the file (ex: http://mydomain.io/flag.yaml). |
Method | the 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). |