Skip to content

No HttpMessageConverter for java.util.HashMap and content type "application/x-www-form-urlencoded;charset=UTF-8" #3711

@Orca007

Description

@Orca007

In what version(s) of Spring Integration are you seeing this issue?

5.5.x

Describe the bug

No HttpMessageConverter for java.util.HashMap and content type "application/x-www-form-urlencoded;charset=UTF-8"
While "application/x-www-form-urlencoded" works fine.

To Reproduce

context configuration:
`

<int:chain input-channel="inputChannel" output-channel="outputChannel">
    <http:outbound-gateway id="gateway" expected-response-type="java.lang.String"
                           url="http://someurl"
                           http-method="POST"
                           extract-request-payload="true"
                           request-factory="sslFactory"/>
</int:chain>

`

Test:

`
Map<String, String> payload = ImmutableMap.of("data", "abcdef");

    inputChannel.send(MessageBuilder.withPayload(Maps.newHashMap(payload))
            .setHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8")
            .build());
    Message<?> result = outputChannel.receive(1000);

`

Result:
No HttpMessageConverter for java.util.HashMap and content type "application/x-www-form-urlencoded;charset=UTF-8"

Expected behavior

hope it works fine same as the header Content-Type=application/x-www-form-urlencoded

Sample

AbstractHttpRequestExecutingMessageHandler.java line 381

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions