l.s.w.i.IWebhookClient(Interface) : interface documentation

Part of lp.services.webhooks.interfaces View In Hierarchy

No interface docstring
Method deliver Deliver a payload to a webhook endpoint.
def deliver(self, url, proxy, user_agent, timeout, secret, delivery_id, event_type, payload):
Deliver a payload to a webhook endpoint.

Returns a dict of request and response details. The 'request' key and one of either 'response' or 'connection_error' are always present.

An exception will be raised if an internal error has occurred that cannot be the fault of the remote endpoint. For example, a 404 will return a response, and a DNS error returns a connection_error, but the proxy being offline will raise an exception.

The timeout is just given to the underlying requests library, so it only provides connect and inter-read timeouts. A reliable overall request timeout will require another mechanism.

If secret is not None, a PubSubHubbub-compatible X-Hub-Signature header will be sent using HMAC-SHA1.

API Documentation for Launchpad, generated by pydoctor at 2020-09-24 00:00:06.