ServeHTTP implements http.Handler for web-based bridges
(w http.ResponseWriter, r *http.Request)
| 600 | |
| 601 | // ServeHTTP implements http.Handler for web-based bridges |
| 602 | func (a *App) ServeHTTP(w http.ResponseWriter, r *http.Request) { |
| 603 | if wb, ok := a.bridge.(http.Handler); ok { |
| 604 | wb.ServeHTTP(w, r) |
| 605 | } else { |
| 606 | http.Error(w, "Bridge does not support HTTP", http.StatusNotImplemented) |
| 607 | } |
| 608 | } |