Resolve by HTTP request
Resolve a value by performing a HTTP request.
Support HTTP, HTTPS. Support TCP and Unix Domain Socket.
Dynamic parameters will be included in the URL (this is the only way to pass dynamic information in GET requests).
This requires a printf
style syntax for inserting strings into the URL, so that proper escaping can take place.
URI Templates (RFC 6570) can potentially be used for this purpose.
Return data is returned as the body in the same way as ResolveByProcess
.
Other features:
- Timeout
- Passing secrets (usually would happen via header).
- How can more complex requests be built, especially for POST requests?
- JSON?
libcurl is the obvious candidate for a HTTP client library.