add convenience method for casting payloads

This commit is contained in:
Joel Wetzell
2026-03-02 12:06:42 -06:00
parent af39c16f30
commit df14024012
38 changed files with 54 additions and 40 deletions

View File

@@ -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")