bug
This commit is contained in:
@@ -155,11 +155,15 @@ public class HttpUtils
|
||||
/// </summary>
|
||||
/// <param name="url">地址.</param>
|
||||
/// <param name="header">请求参数定义.</param>
|
||||
public static string RequestGet(string url, Dictionary<string, object> header = null)
|
||||
public static string RequestGet(string url, Dictionary<string, object> header = null, int? timeout = null)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.Append(url);
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(builder.ToString());
|
||||
if (timeout != null)
|
||||
{
|
||||
request.Timeout = timeout.Value;
|
||||
}
|
||||
request.ContentType = "application/json;charset=utf-8;";
|
||||
ComeSetRequestHeader(request, header);
|
||||
return ComeRequestGet(request);
|
||||
|
||||
Reference in New Issue
Block a user