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 312e9a9..dfa37ca 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -972,11 +972,12 @@ namespace OpenSim.Framework
972 /// <param name="verb"></param> 972 /// <param name="verb"></param>
973 /// <param name="requestUrl"></param> 973 /// <param name="requestUrl"></param>
974 /// <param name="obj"> </param> 974 /// <param name="obj"> </param>
975 /// <param name="timeoutsecs"> </param>
975 /// <returns></returns> 976 /// <returns></returns>
976 /// 977 ///
977 /// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting 978 /// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting
978 /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> 979 /// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
979 public static string MakeRequest(string verb, string requestUrl, string obj) 980 public static string MakeRequest(string verb, string requestUrl, string obj, int timeoutsecs)
980 { 981 {
981 int reqnum = WebUtil.RequestNumber++; 982 int reqnum = WebUtil.RequestNumber++;
982 983
@@ -990,6 +991,8 @@ namespace OpenSim.Framework
990 991
991 WebRequest request = WebRequest.Create(requestUrl); 992 WebRequest request = WebRequest.Create(requestUrl);
992 request.Method = verb; 993 request.Method = verb;
994 if (timeoutsecs > 0)
995 request.Timeout = timeoutsecs * 1000;
993 string respstring = String.Empty; 996 string respstring = String.Empty;
994 997
995 int tickset = Util.EnvironmentTickCountSubtract(tickstart); 998 int tickset = Util.EnvironmentTickCountSubtract(tickstart);
@@ -1086,6 +1089,11 @@ namespace OpenSim.Framework
1086 1089
1087 return respstring; 1090 return respstring;
1088 } 1091 }
1092
1093 public static string MakeRequest(string verb, string requestUrl, string obj)
1094 {
1095 return MakeRequest(verb, requestUrl, obj, -1);
1096 }
1089 } 1097 }
1090 1098
1091 public class SynchronousRestObjectRequester 1099 public class SynchronousRestObjectRequester