sdk-go
sdk-go copied to clipboard
OptionsHandlerFn is set to DeleteHandlerFn in WithDefaultOptionsHandlerFunc
https://github.com/cloudevents/sdk-go/blob/1170e89edb9b504a806f2c6a26563c3c26b68276/v2/protocol/http/options.go#L251
Can you please explain why OptionsHandlerFn
is set to DeleteHandlerFn
in WithDefaultOptionsHandlerFunc
Thanks in advance
It is a bug! ack!!
Want to fix?
Want to fix? Yes definitely.
But in our code we did set it after I receive the protocol object which solves the problem indirectly....
e.g,
p, err := cloudevents.NewHTTP(
cloudevents.WithDefaultOptionsHandlerFunc([]string{"POST", "OPTIONS"}, 100, []string{"*"}, true))
p.OptionsHandlerFn = p.OptionsHandler