aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/WebUtil.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 77f3d9b..71a56e5 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -206,6 +206,7 @@ namespace OpenSim.Framework
206 catch (Exception ex) 206 catch (Exception ex)
207 { 207 {
208 errorMessage = ex.Message; 208 errorMessage = ex.Message;
209 m_log.Debug("[WEB UTIL]: Exception making request: " + ex.ToString());
209 } 210 }
210 finally 211 finally
211 { 212 {
@@ -276,7 +277,7 @@ namespace OpenSim.Framework
276 /// </summary> 277 /// </summary>
277 public static OSDMap PostToService(string url, NameValueCollection data) 278 public static OSDMap PostToService(string url, NameValueCollection data)
278 { 279 {
279 return ServiceFormRequest(url,data,10000); 280 return ServiceFormRequest(url,data, 20000);
280 } 281 }
281 282
282 public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) 283 public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout)
@@ -900,11 +901,18 @@ namespace OpenSim.Framework
900 /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> 901 /// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
901 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) 902 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj)
902 { 903 {
904 return MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, 0);
905 }
906
907 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout)
908 {
903 Type type = typeof(TRequest); 909 Type type = typeof(TRequest);
904 TResponse deserial = default(TResponse); 910 TResponse deserial = default(TResponse);
905 911
906 WebRequest request = WebRequest.Create(requestUrl); 912 WebRequest request = WebRequest.Create(requestUrl);
907 request.Method = verb; 913 request.Method = verb;
914 if (pTimeout != 0)
915 request.Timeout = pTimeout * 1000;
908 916
909 if ((verb == "POST") || (verb == "PUT")) 917 if ((verb == "POST") || (verb == "PUT"))
910 { 918 {