Skip to content

[Bug] java不能通过httpclient提交数据到doris #23712

@dafanshu

Description

@dafanshu

Search before asking

  • I had searched in the issues and found no similar issues.

Version

doris-2.0.0

What's Wrong?

Reason: JSON data is array-object, strip_outer_array must be TRUE.. src line [[{"time":1691028275256,"code":"kkk","name":“test”,"create_time":"2023-08-08T06:21:03"}]];

What You Expected?

success

How to Reproduce?

HttpPut put = new HttpPut(this.loadUrl);
put.setHeader(HttpHeaders.EXPECT, "100-continue");
put.setHeader(HttpHeaders.AUTHORIZATION, this.authorization);
put.setHeader(HttpHeaders.CONTENT_TYPE, "application/json; charset=UTF-8");
put.setHeader("format", "json");
put.setHeader("strip_outer_array", "true");

        HttpEntity entity = new StringEntity(content, ContentType.APPLICATION_JSON);
        put.setEntity(entity);

        try (CloseableHttpResponse response = client.execute(put)) {

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions