微店模拟接口 其他一些功能优化
This commit is contained in:
1 parent
dc6f981a34
commit
cafdbbd95d
20 files changed
+2343
-103
No files matched your search
@@ -760,7 +760,7 @@ namespace AllBase
|
||||
}
|
||||
return webProxy;
|
||||
}
|
||||
public static string ReadResponse(HttpWebResponse response)
|
||||
public static string ReadResponse(HttpWebResponse response, Encoding encoding = null)
|
||||
{
|
||||
using (Stream responseStream = response.GetResponseStream())
|
||||
{
|
||||
@@ -773,8 +773,8 @@ namespace AllBase
|
||||
{
|
||||
streamToRead = new DeflateStream(streamToRead, CompressionMode.Decompress);
|
||||
}
|
||||
|
||||
using (StreamReader streamReader = new StreamReader(streamToRead, Encoding.UTF8))
|
||||
if (encoding == null) encoding = Encoding.UTF8;
|
||||
using (StreamReader streamReader = new StreamReader(streamToRead, encoding))
|
||||
{
|
||||
return streamReader.ReadToEnd();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user