def clear(self):
        """Executes an HTTP request to clear all contents of a queue."""
        url = "queues/%s/messages" % self.name
        result = self.client.delete(url = url,
                                    body = json.dumps({}),
                                    headers={'Content-Type': 'application/json'})

        return result['body']
def clear ( self ) : url = "queues/%s/messages" % self . name result = self . client . delete ( url = url , body = json . dumps ( { } ) , headers = { 'Content-Type' : 'application/json' } ) return result [ 'body' ]
Executes an HTTP request to clear all contents of a queue.