in requests.go [149:164]
func WebhookRequestFromReader(rd io.Reader) (*WebhookRequest, error) {
var req WebhookRequest
b, err := io.ReadAll(rd)
if err != nil {
return nil, err
}
unmarshaler := &protojson.UnmarshalOptions{
AllowPartial: true,
DiscardUnknown: true,
}
err = unmarshaler.Unmarshal(b, &req.WebhookRequest)
if err != nil {
return nil, ErrUnmarshalWrapper("WebhookRequestFromReader", err)
}
return &req, nil
}