diff --git a/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike b/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike index fa4b981f40eb4d7ebfe83f671943a436798b5b67..1a88deea30568e53ad6aec01d8b183af5cbcecde 100644 --- a/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike +++ b/lib/modules/Protocols.pmod/HTTP.pmod/Query.pike @@ -127,7 +127,10 @@ string request; string buf="",headerbuf=""; int datapos; + +#if constant(thread_create) object conthread; +#endif function request_ok,request_fail; array extra_args; @@ -400,6 +403,8 @@ object set_callbacks(function(object,mixed...:mixed) _ok, return this_object(); } +#if constant(thread_create) + object thread_request(string server,int port,string query, void|mapping|string headers,void|string data) { @@ -435,6 +440,8 @@ object thread_request(string server,int port,string query, return this_object(); } +#endif + object sync_request(string server,int port,string query, void|mapping|string headers,void|string data) { @@ -499,6 +506,8 @@ object async_request(string server,int port,string query, return this_object(); } +#if constant(thread_create) + int `()() { // wait for completion @@ -506,6 +515,8 @@ int `()() return ok; } +#endif + string data() { `()();