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

   ### 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
   
   Caused by: 
org.apache.seatunnel.connectors.seatunnel.http.exception.HttpConnectorException:
 ErrorCode:[HTTP-02], ErrorDescription:[The request is failed] - http client 
execute exception, http response status code:[415], 
content:[{"timestamp":"2025-05-26T07:08:08.588+00:00","status":415,"error":"Unsupported
 Media 
Type","exception":"org.springframework.web.HttpMediaTypeNotSupportedException","message":"Invalid
 mime type \"application/json,application/json\": Invalid token character ',' 
in token \"json,application/json\"","path":"/api/demo/lkjt/getContracts"}]
   
   
   ### SeaTunnel Version
   
   2.3.10
   
   ### SeaTunnel Config
   
   ```conf
   {
     "env":{
       "job.mode":"BATCH",
       "pipeline.name":"job_health_day",
       "execution.parallelism":"1"  },
     "source" : [
       {
         "schema" : {
           "fields" : {
             "contract_amount" : "String",
             "handler" : "String",
             "contract_id" : "String",
             "contract_status" : "String",
             "contract_name" : "String",
             "project_name" : "String",
             "payment_type" : "String",
             "party_b" : "String",
             "contract_date" : "String",
             "party_a" : "String",
             "party_c" : "String",
             "paid_amount" : "String",
             "department" : "String",
             "contract_origin" : "String"
           }
         },
         "url" : "https://url.com/api/demo/lkjt/getContracts";,
         "method" : "POST",
         "format" : "json",
         "body" : 
"{\"params\":{\"conditions\":{\"region\":\"EMEA\",\"userType\":\"RETURN\"},\"columns\":{\"startDate\":\"2023-10-01\",\"endDate\":\"2023-11-05\"},\"variables\":{\"hgssiteid\":\"500024371\"}}}",
         "headers" : {
           "authorization" : "Bearer token"
         },
         "plugin_name" : "Http",
         "result_table_name" : null,
         "content_field" : "$.data.*"
       }
     ],
     "sink":[
       {
         "plugin_name":"Console"
       }
     ]
   }
   ```
   
   ### Running Command
   
   ```shell
   org.apache.seatunnel.example.flink.v2.SeaTunnelApiExample
   ```
   
   ### Error Exception
   
   ```log
   Caused by: 
org.apache.seatunnel.connectors.seatunnel.http.exception.HttpConnectorException:
 ErrorCode:[HTTP-02], ErrorDescription:[The request is failed] - http client 
execute exception, http response status code:[415], 
content:[{"timestamp":"2025-05-26T07:08:08.588+00:00","status":415,"error":"Unsupported
 Media 
Type","exception":"org.springframework.web.HttpMediaTypeNotSupportedException","message":"Invalid
 mime type \"application/json,application/json\": Invalid token character ',' 
in token \"json,application/json\"","path":"/api/demo/lkjt/getContracts"}]
        at 
org.apache.seatunnel.connectors.seatunnel.http.source.HttpSourceReader.pollAndCollectData(HttpSourceReader.java:150)
        at 
org.apache.seatunnel.connectors.seatunnel.http.source.HttpSourceReader.internalPollNext(HttpSourceReader.java:362)
        at 
org.apache.seatunnel.connectors.seatunnel.http.source.HttpSourceReader.pollNext(HttpSourceReader.java:330)
        at 
org.apache.seatunnel.translation.flink.source.FlinkSourceReader.pollNext(FlinkSourceReader.java:99)
   ```
   
   ### Zeta or Flink or Spark Version
   
   flink 1.18
   
   ### Java or Scala Version
   
   java 11
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] 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