Several httprequests. How do I do this?

Monkey Forums/Monkey Programming/Several httprequests. How do I do this?

chimaera(Posted 2014) [#1]
Hi,

I have been messing around a bit with httprequest, but I have only used one instance of it.

If I would like to have more than one httprequest how do I implement it? I guess that each httprequest needs its own "oncomplete" function, but how do I do this.

Any good ideas or solutions?

Thanks!


Beaker(Posted 2014) [#2]
I do something like this:
	Method OnHttpRequestComplete:Void( req:HttpRequest )
		Print "Status="+req.Status()
		Print "ResponseText="+req.ResponseText()
		
		If req.Status() = 200
			Select req
				Case download_get_req
				Case blah1
				Case blah2
		End
	End



chimaera(Posted 2014) [#3]
Thanks! I will try it out and see if I can make it work.