WasiHostHttpClientOptions Class
The rules of a WasiHostHttpClient: which requests the component can send over the network of the machine.
public sealed class WasiHostHttpClientOptionsRemarks
By default, the component cannot send any request: give it only the access it needs.
Constructors
| Name | Description |
|---|---|
| WasiHostHttpClientOptions() |
WasiHostHttpClientOptions()
WasiHttpClient.cspublic WasiHostHttpClientOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| AddressCheck | Gets the check of the IP addresses that the client connects to (WasiSocketAddressUse.TcpConnect), or null to allow every address. Check the addresses to prevent a host name from leading to the machines of the local network (such as WasiHostNetworkOptions.AllowLoopback, or a check that denies the private addresses). |
| AllowAll | Gets a check that allows every request. |
| ConnectTimeout | Gets the timeout of the connections when the request does not set one (connect-timeout). The default is 30 seconds. |
| RequestCheck | Gets the check of the requests, or null to deny every request. |
AddressCheck
WasiHttpClient.csGets the check of the IP addresses that the client connects to (WasiSocketAddressUse.TcpConnect), or null to allow every address. Check the addresses to prevent a host name from leading to the machines of the local network (such as WasiHostNetworkOptions.AllowLoopback, or a check that denies the private addresses).
public WasiSocketAddressCheck? AddressCheck { get; init; }Property value
AllowAll
WasiHttpClient.csGets a check that allows every request.
public static WasiHttpRequestCheck AllowAll { get; }Property value
ConnectTimeout
WasiHttpClient.csRequestCheck
WasiHttpClient.csGets the check of the requests, or null to deny every request.
public WasiHttpRequestCheck? RequestCheck { get; init; }Property value
Methods
| Name | Description |
|---|---|
| AllowHosts(string[]) | Returns a check that allows the requests to some hosts (compared without case), such as api.example.com. |
AllowHosts(string[])
WasiHttpClient.csReturns a check that allows the requests to some hosts (compared without case), such as api.example.com.
public static WasiHttpRequestCheck AllowHosts(params string[] hosts)