{"record":{"id":"07f45262acc30c1d","repo":"apache/dolphinscheduler","slug":"http-request-method-s-not-supported-07f452","errorCode":null,"errorMessage":"http request method %s not supported","messagePattern":"http request method (.+?) not supported","errorType":"validation","errorClass":"TaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-http/src/main/java/org/apache/dolphinscheduler/plugin/task/http/HttpTask.java","lineNumber":143,"sourceCode":"        }\n\n        // default success log\n        log.info(\"http request success, url: {}, statusCode: {}, body: {}\", httpParameters.getUrl(), statusCode, body);\n        exitStatusCode = TaskConstants.EXIT_CODE_SUCCESS;\n    }\n\n    private OkHttpResponse sendRequest() {\n        switch (httpParameters.getHttpRequestMethod()) {\n            case GET:\n                return sendGetRequest();\n            case POST:\n                return sendPostRequest();\n            case PUT:\n                return sendPutRequest();\n            case DELETE:\n                return sendDeleteRequest();\n            default:\n                throw new TaskException(String.format(\"http request method %s not supported\",\n                        httpParameters.getHttpRequestMethod()));\n        }\n    }\n\n    @SneakyThrows\n    private OkHttpResponse sendGetRequest() {\n        OkHttpRequestHeaders okHttpRequestHeaders = new OkHttpRequestHeaders();\n        okHttpRequestHeaders.setHeaders(getHeaders());\n        okHttpRequestHeaders.setOkHttpRequestHeaderContentType(getContentType());\n        Map<String, Object> requestParams = getRequestParams();\n\n        OkHttpResponse okHttpResponse = OkHttpUtils.get(httpParameters.getUrl(), okHttpRequestHeaders,\n                requestParams, httpParameters.getConnectTimeout(),\n                httpParameters.getConnectTimeout(), httpParameters.getConnectTimeout());\n        addDefaultOutput(JSONUtils.toJsonString(okHttpResponse));\n        return okHttpResponse;\n    }\n","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-http/src/main/java/org/apache/dolphinscheduler/plugin/task/http/HttpTask.java#L125-L161","documentation":"A switch default guard in sendRequest: httpParameters.getHttpRequestMethod() did not match GET/POST/PUT/DELETE, so no request can be dispatched. The offending input is the configured request method string — a typo, an unsupported verb (PATCH, HEAD), or a value written by an incompatible version; the message interpolates the method name.","triggerScenarios":"Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-http/src/main/java/org/apache/dolphinscheduler/plugin/task/http/HttpTask.java:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of GET, POST, PUT, DELETE as the httpMethod","For other verbs, use a shell task with curl instead of the HTTP task"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}