Class HttpToolOptions
Configuration options shared by all HTTP tools.
public sealed class HttpToolOptions
- Inheritance
-
HttpToolOptions
- Inherited Members
Examples
Tightening timeout and response-size cap on HTTP tools:
using LMKit.Agents.Tools.BuiltIn.Net;
var options = new HttpToolOptions
{
Timeout = TimeSpan.FromSeconds(10),
MaxResponseSize = 1_000_000
};
var get = new HttpGetTool(options);
Properties
- AllowedHosts
Gets or sets allowed hosts. Null or empty allows all.
- AllowedSchemes
Gets or sets allowed URL schemes. Null or empty allows all.
- BlockedHosts
Gets or sets blocked hosts.
- DefaultUserAgent
Gets or sets the default User-Agent header.
- Egress
The server-side egress gate. When set, it REPLACES the simple host lists above: every request is validated by the policy (public-web or allowed-hosts mode, private-address protection, pinned connections, per-redirect revalidation), caller-provided headers are ignored, and redirects are followed by the gate itself. Null keeps the classic client-side behavior.
- MaxResponseSize
Gets or sets the maximum response size in characters. 0 for unlimited.
- Timeout
Gets or sets the request timeout. Default is 30 seconds.