Open
Description
If I try to implement a webhook, I don't find the models for the body of the POST performed by Mailgun.
EventItem can be used but it's just part of the bod. There is also the signature part. Both are wrapped in a model.
This is what I did in Kotlin with Spring Boot (Java is similar)
@PostMapping("/events")
fun eventHook(@RequestBody event: Event) {
val correlationId = event.eventData.message.headers.messageId
val timestamp = event.signature.timestamp
// ....
}
data class Event(
val signature: Signature,
@JsonProperty("event-data")
val eventData: EventItem
)
data class Signature(
val token: String,
val timestamp: String,
val signature: String
)
Metadata
Metadata
Assignees
Labels
No labels
Activity