cugwangping opened a new issue, #5761:
URL: https://github.com/apache/seatunnel/issues/5761

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   How do I pass a POST request when the body parameter is a form? request 
method is POST,body parameter is form type,Content-Type: multipart/form-data,I 
hava a request test's 
response:{"timestamp":"2023-10-31T03:38:40.252+00:00","status":500,"error":"Internal
 Server Error","path":"/example/login"}. The Http interface returns 500 status 
code. The request body is a StringEntity, not a MultipartForm object. How 
should I solve this problem?
   
   ### SeaTunnel Version
   
   2.3.3
   
   ### SeaTunnel Config
   
   ```conf
   {
        "env": {
                "execution.parallelism": 1,
                "job.mode": "BATCH"
        },
        "source": [{
                "plugin_name": "Http",
                "url": "http://127.0.0.1:8080/example/login";,
                "format": "json",
                "method": "POST",
                "schema": {
                        "fields": {
                                "msg": "String",
                                "code": "String"
                        }
                },
                "json_field": {
                        "msg": "$.msg",
                        "code": "$.code"
                },
                "headers": {
                        "Content-Type": "multipart/form-data"
                },
                "body": "username:\"admin\" password:\"12345\"",
                "result_table_name": "source"
        }],
        "sink": [{
                "plugin_name": "Console",
                "source_table_name": "source"
        }]
   }
   ```
   
   
   ### Running Command
   
   ```shell
   sh ./bin/seatunnel.sh -c http-form2console.json
   ```
   
   
   ### Error Exception
   
   ```log
   ERROR org.apache.seatunnel.connectors.seatunnel.http.source.HttpSourceReader 
- http client execute exception, http response status code:[500], 
content:[{"timestamp":"2023-10-31T01:52:57.511+00:00","status":500,"error":"Internal
 Server Error","path":"/example/login"}]
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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]

Reply via email to