Explorar o código

Fixed linux httprequest.

Mark Sibly %!s(int64=7) %!d(string=hai) anos
pai
achega
975aa96ae3
Modificáronse 1 ficheiros con 9 adicións e 5 borrados
  1. 9 5
      modules/httprequest/httprequest_desktop.monkey2

+ 9 - 5
modules/httprequest/httprequest_desktop.monkey2

@@ -17,14 +17,18 @@ Class HttpRequest Extends HttpRequestBase
 		
 		id+=1
 		
-		_tmp=GetEnv( "TMP" )+"\wget-"+id+".txt"
+	#If __TARGET__="windos"
+		_tmp=GetEnv( "TMP" )+"\mx2_wget-"+id+".txt"
+	#Else
+		_tmp="/tmp/mx2_wget-"+id+".txt"
+	#endif
 		
-	#if __TARGET__="windows"
+'	#if __TARGET__="windows"
 		Local post_data:=_req="POST" ? " -post-data=~q"+text+"~q" Else ""
 		Local cmd:="wget -q -T "+_timeout+" -O ~q"+_tmp+"~q --method="+_req+post_data+" ~q"+_url+"~q"
-	#else
-		Local cmd:="curl -s -m "+timeout+" -o ~q"+_tmp+"~q ~q"+url+"~q"
-	#endif
+'	#else
+'		Local cmd:="curl -s -m "+_timeout+" -o ~q"+_tmp+"~q ~q"+_url+"~q"
+'	#endif
 		
 		_process=New Process