Skip to content

Perform case-insensitive lookup in HttpMethod.valueOf() #36518

@wbrco

Description

@wbrco

Spent several hours troubleshooting 400 responses where lower case values were being parsed by HttpMethod.valueOf(). when used with WebClient.method().

Please either:

  • Update the API documentation stating that the method doesn't normalize the value to uppercase.
  • In the method, perform a .toUpperCase() before passing it to the switch statement.
  • Or thow an IllegalArgumentException when a lower case string is passed.

Sometimes it's the little things that count!

Thank You!

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions