Class WebhookLogFactory
Implements IWebhookLogFactory to create webhook log entries.
Inheritance
object
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public class WebhookLogFactory : IWebhookLogFactory
Constructors
View SourceWebhookLogFactory()
Declaration
public WebhookLogFactory()
Methods
View SourceCreateAsync(string, HttpRequestMessage, HttpResponseMessage?, int, Exception?, IWebhook, CancellationToken)
Creates a new WebhookLog entry based on the webhook request and response.
Declaration
public Task<WebhookLog> CreateAsync(string eventAlias, HttpRequestMessage requestMessage, HttpResponseMessage? httpResponseMessage, int retryCount, Exception? exception, IWebhook webhook, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | eventAlias | The alias of the event that triggered the webhook. |
| HttpRequestMessage | requestMessage | The HTTP request message sent to the webhook endpoint. |
| HttpResponseMessage | httpResponseMessage | The HTTP response message received, or |
| int | retryCount | The number of retry attempts made. |
| Exception | exception | The exception that occurred during the request, or |
| IWebhook | webhook | The IWebhook that was fired. |
| CancellationToken | cancellationToken | A cancellation token to cancel the operation. |
Returns
| Type | Description |
|---|---|
| Task<WebhookLog> | A task that represents the asynchronous operation, containing the created WebhookLog. |