nkgotcode opened a new pull request, #5258:
URL: https://github.com/apache/eventmesh/pull/5258
Fixes #5233
### Motivation
The HTTP connector common protocol fails when it receives a JSON object body
because the request payload is parsed as a Java `String`. A JSON object such as
`{"name":"Andy"}` cannot be deserialized that way, so the connector rejects a
valid request body.
### Modifications
The common HTTP protocol now preserves the raw request body string before
enqueuing the `WebhookRequest`. A regression test starts the Vert.x route
through `CommonProtocol`, posts a JSON object, verifies the HTTP 200 response,
and checks that the queued request payload is unchanged.
Validation:
```bash
docker run --rm -v "$PWD":/workspace -w /workspace eclipse-temurin:8-jdk
./gradlew :eventmesh-connectors:eventmesh-connector-http:test --tests
org.apache.eventmesh.connector.http.source.protocol.impl.CommonProtocolTest
--no-daemon --stacktrace
```
```text
BUILD SUCCESSFUL
```
### Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
- If a feature is not applicable for documentation, explain why? This fixes
request payload handling for an existing connector protocol.
- If a feature is not documented yet in this PR, please create a followup
issue for adding the documentation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]