ftware is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all co
Tag: url
C# Programmation Réseau: Se connecter un serveur HTTP avec les identifiants
ord);
request.ContentLength = data.Length;
request.ContentType = "text/plain";
using (StreamWriter writer = new StreamWriter(request.GetRequestStre
C# Programmation Réseau: Exécuter une requête POST d’un serveur HTTP
;
request.BeginGetRequestStream(new AsyncCallback(GetRequestStreamCallback), request);
allDone.WaitOne();
}
private static void GetRequ
C# Programmation Réseau: Vérifier si un URL est ROOT
ftware is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all co
C# Programmation Réseau: Encoder un URL
y stirng routines
///
public class StringUtil
{
private static readonly Regex urlEncodeRegex = new Regex("[^a-zA-Z0-9\.\-_~]", Re
C# Programmation Réseau: Vérifier si le nom d’un schéma est valide
using System;
public class MainClass{
public static void Main(){
Uri address1 = new Uri("http://www.yourDomain.com/index.htm#search");
Console.WriteLine("address 1 {0} a valid scheme name",
Uri.CheckSchemeName(address1.Scheme) ? " has" : " does not have");
if (address1.Scheme == Uri.UriSchemeHttp)
Console.WriteLine("Uri is HTTP type");
Console.WriteLine(address1.HostNameType);
}
}