flowable/flowable-engine · error · FlowableException
HTTP method not supported
Error message
${method} HTTP method not supported What it means
prepareRequest builds the Apache HttpRequest via a switch on the HTTP method. Only GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS (per the switch) are supported; any other method string reaches the default branch and throws FlowableException with '<method> HTTP method not supported'. The delegating layer normally restricts methods, but the expression-driven method value can still resolve to something unsupported.
Solutions
- Change the requestMethod to one of the supported verbs (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS)
- If the target API only supports the non-standard verb, use a supported verb with an override header (e.g. X-HTTP-Method-Override) if the server honors it
- Validate/sanitize the variable feeding requestMethod before the task
- Extend the client via a custom HttpRequestInformation handler if non-standard methods are truly required
Example fix
// before
execution.setVariable("httpMethod", "PURGE");
// after
execution.setVariable("httpMethod", "POST"); Defensive patterns
Strategy: validation
Validate before calling
java.util.Set<String> SUPPORTED = java.util.Set.of("GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS");
String m = (String) execution.getVariable("httpMethod");
if (m == null || !SUPPORTED.contains(m.trim().toUpperCase())) {
throw new IllegalArgumentException("Unsupported HTTP method: " + m);
} Type guard
boolean isSupportedMethod(String m) { return m != null && java.util.Set.of("GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS").contains(m.trim().toUpperCase()); } Try / catch
try {
client.prepareRequest(requestInfo);
} catch (FlowableException e) {
if (e.getMessage() != null && e.getMessage().endsWith("HTTP method not supported")) {
// reject or substitute a supported verb
} else { throw e; }
} Prevention
- Whitelist methods before binding them to requestMethod expressions
- Never pass user-supplied strings directly as the HTTP method
- Use X-HTTP-Method-Override for non-standard verbs where the server supports it
When it happens
Trigger: The HTTP task's requestMethod expression resolves at runtime to a method outside the supported set (e.g. 'TRACE', 'CONNECT', lowercase handled, but a custom/invalid value like 'PURGE' or 'GET2'), reaching prepareRequest directly.
Common situations: Passing the HTTP method from a process variable that came from user input or an external system; typos like 'DELET'; supporting non-standard verbs used by some APIs (e.g. Elasticsearch PURGE) through generic HTTP tasks.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- can't clear configuration beans
- can't search values in configuration beans
- Cannot change fixed value with
- Cannot move a history job to an executable job
- CommandInvoker must be the last interceptor in the chain
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/66e4733dc485aad0.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/apache/ApacheHttpComponentsFlowableHttpClient.java:223
setRequestEntity(requestInfo, patch);
request = patch;
break;
}
case "DELETE": {
HttpDeleteWithBody delete = new HttpDeleteWithBody(uri);
setRequestEntity(requestInfo, delete);
request = delete;
break;
}
case "HEAD": {
request = new HttpHead(uri);
break;
}
case "OPTIONS":
request = new HttpOptions(uri);
break;
default: {
throw new FlowableException(requestInfo.getMethod() + " HTTP method not supported");
}
}
setHeaders(request, requestInfo.getHttpHeaders());
setHeaders(request, requestInfo.getSecureHttpHeaders());
setConfig(request, requestInfo);
return new ApacheHttpComponentsExecutableHttpRequest(request);
} catch (URISyntaxException ex) {
throw new FlowableException("Invalid URL exception occurred", ex);
} catch (IOException ex) {
throw new FlowableException("IO exception occurred", ex);
}
}
protected URI createUri(String url) throws URISyntaxException {
String uri = SPACE_CHARACTER_PATTERN.matcher(url).replaceAll(ENCODED_SPACE_CHARACTER);
return new URI(PLUS_CHARACTER_PATTERN.matcher(uri).replaceAll(ENCODED_PLUS_CHARACTER));View on GitHub (pinned to d6d39ce1c6)