summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/wsgi/httputil.py
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-10-25 03:18:16 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-10-25 03:18:16 +0000
commita2a2cb76e9582af32b6803be7fa99af074dc04ae (patch)
treed0ef504321e72fe16afd23f385f20386530f5dfc /sca-cpp/trunk/modules/wsgi/httputil.py
parent0dd33c3859618f3a385583d7344230f0e1eb1004 (diff)
Support python method invocation style on references, ref.func(...) in addition to ref('func', ...). Minor cleanup of the various samples, renamed gettotal to total and getcatalog to items, for consistency with the python sample.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1026939 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-cpp/trunk/modules/wsgi/httputil.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/sca-cpp/trunk/modules/wsgi/httputil.py b/sca-cpp/trunk/modules/wsgi/httputil.py
index 3d0c3350ef..723e1a7284 100644
--- a/sca-cpp/trunk/modules/wsgi/httputil.py
+++ b/sca-cpp/trunk/modules/wsgi/httputil.py
@@ -56,6 +56,15 @@ class client:
return None
return jsonResultValue((res.read(),))
+ def __getattr__(self, name):
+ if name[0] == '_':
+ raise AttributeError()
+ if name == "eval":
+ return self
+ l = lambda *args: self.__call__(name, *args)
+ self.__dict__[name] = l
+ return l
+
def __repr__(self):
return repr((self.url,))