-
Notifications
You must be signed in to change notification settings - Fork 8
Define Hook
Furkan Güngör edited this page Jan 2, 2022
·
4 revisions
Get IHookService
from Dependency Injection.
var hook = new Hook
{
TenantId = "xx",
Key = "hook.key",
Name = "name of hook",
HookRequests = new List<HookRequest>
{
new HookRequest
{
Url = "https://google.com/search?q=ironhook",
MaxRetryCount = 3,
NotifiyEmail = "[email protected]",
Method = "GET",
Headers = JsonSerializer.Serialize(new List<HeaderParameter>
{
new HeaderParameter
{
Name = "Authorization",
Value = "Bearer xxx"
},
new HeaderParameter
{
Name = "ApiKey",
Value = "xxxxx"
},
})
},
new HookRequest
{
Url = "https://google.com/search?q=github",
MaxRetryCount = 4,
NotifiyEmail = "[email protected]",
Method = "GET",
Headers = JsonSerializer.Serialize(new List<HeaderParameter>
{
new HeaderParameter
{
Name = "Authorization",
Value = "Bearer xxx"
}
})
}
}
};
await hookService.AddAsync(hook);
Welcome to the Iron Hook wiki!
Topics:
-
Getting Started
-
Providers
-
Quick Implementation
-
Customization
-
Other