| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | |
| 3 | package web |
| 4 | |
| 5 | func ExampleHTTPConfig_usage() { |
| 6 | // Just embed HTTPConfig into your module structure. |
| 7 | // It allows you to have both RequestConfig and ClientConfig fields in the module configuration file. |
| 8 | type myModule struct { |
| 9 | HTTPConfig `yaml:",inline"` |
| 10 | } |
| 11 | |
| 12 | var m myModule |
| 13 | _, _ = NewHTTPRequest(m.RequestConfig) |
| 14 | _, _ = NewHTTPClient(m.ClientConfig) |
| 15 | } |