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
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 HttpContent for posting web form fields with functions like System.Net.Http.HttpClient.PostAsync and ExtInternet.Post. |
jsonContent(string) | Creates an HttpContent for posting a JSON string. It can be used with functions like System.Net.Http.HttpClient.PostAsync and ExtInternet.Post. |
jsonContent(JsonNode) | Creates an HttpContent for posting JSON. It can be used with functions like System.Net.Http.HttpClient.PostAsync and ExtInternet.Post. |
jsonContent<T>(T) | Creates an HttpContent for posting an object serialized as JSON. It can be used with functions like System.Net.Http.HttpClient.PostAsync and ExtInternet.Post. |
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. |