Method internet.message
Overload
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).
public static HttpRequestMessage message(HttpMethod method, string url, IEnumerable<string> headers = null, HttpContent content = null, string auth = null)
Parameters
|
method (HttpMethod)
|
|
url (string)
URL. To create URL with urlencoded parameters you can use internet.urlAppend. |
|
headers (IEnumerable<string>)
|
| content (HttpContent) |
|
auth (string)
String like |
Returns
Examples
using System.Net.Http;
var m = internet.message(HttpMethod.Get, "https://www.example.com");
var r = internet.http.Send(m);
print.it(r.Text());