Class internet
This class, together with ExtInternet (extension methods), make easier to use System.Net.Http.HttpClient and other .NET Internet classes for tasks like download, post, ping.
public static class internet
Namespace: Au
Assembly: Au.dll
Inheritance
Properties
| Name | Description |
|---|---|
| http | Gets a static System.Net.Http.HttpClient instance that can be used in scripts to download web pages, post web form data, etc. |
Methods
| Name | Description |
|---|---|
| formContent(params (string name, object value)[]) | Creates an System.Net.Http.HttpContent for posting web form fields with functions like System.Net.Http.HttpClient.PostAsync and ExtInternet.Post. |
| jsonContent(object, JsonSerializerOptions) | Creates System.Net.Http.HttpContent for posting JSON. It can be used with functions like System.Net.Http.HttpClient.PostAsync and ExtInternet.Post. |
| message(HttpMethod, string, IEnumerable<string>, HttpContent, string) | Creates System.Net.Http.HttpRequestMessage for System.Net.Http.HttpClient.Send or System.Net.Http.HttpClient.SendAsync in the same way as the System.Net.Http.HttpClient extension methods of this library (ExtInternet.Get, ExtInternet.Post etc). |
| ping(out int, string, int) | Sends an ICMP echo message to the specified website and returns |
| ping(string, int) | Sends an ICMP echo message to the specified website and returns |
| urlAppend(string, params string[]) | Joins a URL address and parameters. Urlencodes parameters. |