diff --git a/docusaurus/docs/how-to-guides/app-plugins/add-authentication-for-app-plugins.md b/docusaurus/docs/how-to-guides/app-plugins/add-authentication-for-app-plugins.md index 05d2b89806..1a3a199249 100644 --- a/docusaurus/docs/how-to-guides/app-plugins/add-authentication-for-app-plugins.md +++ b/docusaurus/docs/how-to-guides/app-plugins/add-authentication-for-app-plugins.md @@ -231,7 +231,6 @@ func (a *App) handleMyRequest(w http.ResponseWriter, req *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) return } - w.WriteHeader(http.StatusOK) } ``` @@ -255,7 +254,6 @@ func (a *App) handleMyRequest(w http.ResponseWriter, req *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) return } - w.WriteHeader(http.StatusOK) } ``` diff --git a/docusaurus/docs/how-to-guides/app-plugins/add-backend-component.md b/docusaurus/docs/how-to-guides/app-plugins/add-backend-component.md index 1f2a239391..3f3a6453c5 100644 --- a/docusaurus/docs/how-to-guides/app-plugins/add-backend-component.md +++ b/docusaurus/docs/how-to-guides/app-plugins/add-backend-component.md @@ -109,7 +109,6 @@ func (a *App) handleMyCustomEndpoint(w http.ResponseWriter, r *http.Request) { // handle the request // e.g. call a third-party API w.Write([]byte("my custom response")) - w.WriteHeader(http.StatusOK) } ``` diff --git a/docusaurus/docs/how-to-guides/data-source-plugins/convert-a-frontend-datasource-to-backend.md b/docusaurus/docs/how-to-guides/data-source-plugins/convert-a-frontend-datasource-to-backend.md index d18c75905b..6e4329f801 100644 --- a/docusaurus/docs/how-to-guides/data-source-plugins/convert-a-frontend-datasource-to-backend.md +++ b/docusaurus/docs/how-to-guides/data-source-plugins/convert-a-frontend-datasource-to-backend.md @@ -391,7 +391,6 @@ func handleTables(w http.ResponseWriter, r *http.Request) { // Handle errors (omited) w.Write(body) - w.WriteHeader(http.StatusOK) } ``` diff --git a/docusaurus/docs/shared/implement-resource-handler.md b/docusaurus/docs/shared/implement-resource-handler.md index 3c04333eea..d5b07b4349 100644 --- a/docusaurus/docs/shared/implement-resource-handler.md +++ b/docusaurus/docs/shared/implement-resource-handler.md @@ -52,7 +52,6 @@ func (p *MyPlugin) handleNamespaces(rw http.ResponseWriter, req *http.Request) { if err != nil { return } - rw.WriteHeader(http.StatusOK) } func (p *MyPlugin) handleProjects(rw http.ResponseWriter, req *http.Request) { @@ -61,7 +60,6 @@ func (p *MyPlugin) handleProjects(rw http.ResponseWriter, req *http.Request) { if err != nil { return } - rw.WriteHeader(http.StatusOK) } ``` @@ -82,7 +80,6 @@ func (p *MyPlugin) handleSomeRoute(rw http.ResponseWriter, req *http.Request) { if err != nil { return } - rw.WriteHeader(http.StatusOK) } ``` diff --git a/packages/create-plugin/templates/backend-app/pkg/plugin/resources.go b/packages/create-plugin/templates/backend-app/pkg/plugin/resources.go index d125ed99fa..33ac94596e 100644 --- a/packages/create-plugin/templates/backend-app/pkg/plugin/resources.go +++ b/packages/create-plugin/templates/backend-app/pkg/plugin/resources.go @@ -12,7 +12,6 @@ func (a *App) handlePing(w http.ResponseWriter, req *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) return } - w.WriteHeader(http.StatusOK) } // handleEcho is an example HTTP POST resource that accepts a JSON with a "message" key and @@ -34,7 +33,6 @@ func (a *App) handleEcho(w http.ResponseWriter, req *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) return } - w.WriteHeader(http.StatusOK) } // registerRoutes takes a *http.ServeMux and registers some HTTP handlers.