I found woefully few samples of httplib2 using the following template defined in the httplib2 documents.
The following (GETs) work (and I now need to implement POST methods using it)
URLS = (
'/', 'PingLocal',
'/ping', 'PingLocal',
'/ping/silo', 'PingSilo'
)
class PingLocal(object):
def GET(self):
return json.dumps({'time': time.strftime('%m/%d/%Y %I:%M:%S'), 'message': 'XYZ Server Responding to Ping'})
How to implement POST methods and pass data (body) to the post request? A few examples I did come across do not use this suggested
"URLS-list / Classes" model.
Any pointers appreciated. Thank you.