using App.Util;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Security.Cryptography;
namespace App.Net
{
public class HttpManage : Singleton<HttpManage>
{
private HttpClient httpClient;
public void Init()
{
//AutomaticDecompression = DecompressionMethods.GZip TODO 压缩
var handle = new HttpClientHandler() { };
httpClient = new HttpClient(handle);
}
public void PostAsyn(string protocol, string stream, string sign, StringDelegate callBack)
{
var content = new FormUrlEncodedContent(new Dictionary<string, string>()
{
{"protocol",protocol },
{"steam",stream },
{"sign",sign }
});
}
public string MD5ForPHP(string stringToHash)
{
MD5 md5 = new MD5CryptoServiceProvider();
byte[] output = md5.computehash(encoding.utf8.getbytes(stringtohash));
return BitConverter.ToString(output).Replace("-", "");
}
}
}
似乎是mscorlib.dll库的问题,有点懵