HTTP(S)
Overview
Fetches the configuration from a remote URL over HTTP(S). This retriever is useful when you want to fetch the configuration from a remote server endpoint.Configure the relay proxy
To configure your relay proxy to use the HTTP(S) retriever, you need to add the following configuration to your relay proxy configuration file:
goff-proxy.yaml
# ...
retrievers:
  - kind: http
    url: https://my-feature-flag-location.com/flags.goff.yaml
# ...
| Field name | Mandatory | Type | Default | Description | 
|---|---|---|---|---|
kind | String | none | Value should be http.This field is mandatory and describes which retriever you are using.  | |
url | String | none | Location to retrieve the file. | |
method | String | GET | The HTTP Method you are using to call the HTTP endpoint. | |
body | String | none | The HTTP Body you are using to call the HTTP endpoint. | |
headers | Object | none | The HTTP headers used when calling the HTTP endpoint (useful for authorization). | |
timeout | String | 10000 | Timeout in millisecond when calling the HTTP endpoint. | 
Configure the GO Module
To configure your GO module to use the HTTP(S) retriever, you need to add the following
configuration to your ffclient.Config{} object:
example.go
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()
| Field | Mandatory | 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 | If you need a body to get the flags. | |
| Header | Header you should pass while calling the endpoint (useful for authorization). | |
| Timeout | Timeout for the HTTP call  (default is 10 seconds).  |