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 af25da9..f90df12 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -173,6 +173,7 @@ namespace OpenSim.Framework
173 catch (Exception ex) 173 catch (Exception ex)
174 { 174 {
175 errorMessage = ex.Message; 175 errorMessage = ex.Message;
176 m_log.Debug("[WEB UTIL]: Exception making request: " + ex.ToString());
176 } 177 }
177 finally 178 finally
178 { 179 {
@@ -243,7 +244,7 @@ namespace OpenSim.Framework
243 /// </summary> 244 /// </summary>
244 public static OSDMap PostToService(string url, NameValueCollection data) 245 public static OSDMap PostToService(string url, NameValueCollection data)
245 { 246 {
246 return ServiceFormRequest(url,data,10000); 247 return ServiceFormRequest(url,data, 20000);
247 } 248 }
248 249
249 public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) 250 public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout)
@@ -859,11 +860,18 @@ namespace OpenSim.Framework
859 /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> 860 /// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
860 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) 861 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj)
861 { 862 {
863 return MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, 0);
864 }
865
866 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout)
867 {
862 Type type = typeof(TRequest); 868 Type type = typeof(TRequest);
863 TResponse deserial = default(TResponse); 869 TResponse deserial = default(TResponse);
864 870
865 WebRequest request = WebRequest.Create(requestUrl); 871 WebRequest request = WebRequest.Create(requestUrl);
866 request.Method = verb; 872 request.Method = verb;
873 if (pTimeout != 0)
874 request.Timeout = pTimeout * 1000;
867 875
868 if ((verb == "POST") || (verb == "PUT")) 876 if ((verb == "POST") || (verb == "PUT"))
869 { 877 {