mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
add convenience method for casting payloads
This commit is contained in:
@@ -182,7 +182,7 @@ func (hs *HTTPServer) Output(ctx context.Context, payload any) error {
|
||||
return errors.New("http.server output must originate from an http.server input")
|
||||
}
|
||||
|
||||
payloadResponse, ok := payload.(processor.HTTPResponse)
|
||||
payloadResponse, ok := processor.GetAnyAs[processor.HTTPResponse](payload)
|
||||
|
||||
if !ok {
|
||||
return errors.New("http.server is only able to output HTTPResponse")
|
||||
|
||||
Reference in New Issue
Block a user