aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/WebUtil.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/WebUtil.cs')
-rw-r--r--OpenSim/Framework/WebUtil.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index cafa441..60c1e15 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -243,6 +243,7 @@ namespace OpenSim.Framework
243 catch (Exception ex) 243 catch (Exception ex)
244 { 244 {
245 errorMessage = ex.Message; 245 errorMessage = ex.Message;
246 m_log.Debug("[WEB UTIL]: Exception making request: " + ex.ToString());
246 } 247 }
247 finally 248 finally
248 { 249 {
@@ -309,7 +310,7 @@ namespace OpenSim.Framework
309 /// </summary> 310 /// </summary>
310 public static OSDMap PostToService(string url, NameValueCollection data) 311 public static OSDMap PostToService(string url, NameValueCollection data)
311 { 312 {
312 return ServiceFormRequest(url,data,10000); 313 return ServiceFormRequest(url,data, 20000);
313 } 314 }
314 315
315 public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) 316 public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout)
@@ -923,11 +924,18 @@ namespace OpenSim.Framework
923 /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> 924 /// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
924 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) 925 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj)
925 { 926 {
927 return MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, 0);
928 }
929
930 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout)
931 {
926 Type type = typeof(TRequest); 932 Type type = typeof(TRequest);
927 TResponse deserial = default(TResponse); 933 TResponse deserial = default(TResponse);
928 934
929 WebRequest request = WebRequest.Create(requestUrl); 935 WebRequest request = WebRequest.Create(requestUrl);
930 request.Method = verb; 936 request.Method = verb;
937 if (pTimeout != 0)
938 request.Timeout = pTimeout * 1000;
931 939
932 if ((verb == "POST") || (verb == "PUT")) 940 if ((verb == "POST") || (verb == "PUT"))
933 { 941 {