/// <summary> /// 如果服务不可用,则返回保护状态 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="jsonSerializer"></param> /// <param name="url"></param> /// <param name="requestPara"></param> /// <param name="headerParams"></param> /// <param name="timeout"></param> /// <returns></returns> public override T Get <T>(IJsonSerializer jsonSerializer, UrlConcat url, IDictionary <string, string> requestPara, IDictionary <string, string> headerParams, int timeout = 30000) { if (string.IsNullOrEmpty(url.Host)) { return(default(T)); } return(base.Get <T>(jsonSerializer, url, requestPara, headerParams, timeout)); }
/// <summary> /// 如果服务不可用,则返回保护状态 /// </summary> /// <param name="jsonSerializer"></param> /// <param name="url"></param> /// <param name="jsonDate"></param> /// <param name="headerParams"></param> /// <param name="timeout"></param> public override void Post(IJsonSerializer jsonSerializer, UrlConcat url, string jsonDate, IDictionary <string, string> headerParams, int timeout = 30000) { if (string.IsNullOrEmpty(url.Host)) { return; } base.Post(jsonSerializer, url, jsonDate, headerParams, timeout); }
/// <summary> /// 如果服务不可用,则返回保护状态 /// </summary> /// <param name="jsonSerializer"></param> /// <param name="url"></param> /// <param name="requestPara"></param> /// <param name="headerParams"></param> /// <param name="timeout"></param> public override void Get(IJsonSerializer jsonSerializer, UrlConcat url, IDictionary <string, string> requestPara, IDictionary <string, string> headerParams, int timeout = 30000) { if (string.IsNullOrEmpty(url.Host)) { return; } base.Get(jsonSerializer, url, requestPara, headerParams, timeout); }